Ferreteria/v0.5/@cls/caNavElement: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 5: Line 5:
|}
|}
* '''Source''': {{l/ferreteria/code|layout/nav/NavElem.php}}
* '''Source''': {{l/ferreteria/code|layout/nav/NavElem.php}}
* '''System''': {{l/ver|layout}}
==Methods==
==Methods==
===rendering===
===rendering===
* <syntaxhighlight lang=php inline>public function OnRender(cEventNodeRender $oe) : void { $oe->Append($this->RenderOutput()); }</syntaxhighlight>
''see {{l/ver|layout/event}} subsystem''
* <code>GetShouldDisplay()</code> returns <code>GetVisible()</code>.
* {{l/ver/meth|layout/event|OnRender}} appends RenderOutput()
* <code>GetVisible()</code> ''probably'' comes from {{l/ver/class|cElement}} (to be checked).
** <syntaxhighlight lang=php inline>public function OnRender(cEventNodeRender $oe) : void { $oe->Append($this->RenderOutput()); }</syntaxhighlight>
* <code>RenderOutput()</code>:
* {{l/ver/meth|layout/event|GetShouldDisplay}} returns <code>GetVisible()</code>.
* <code>GetVisible()</code> returns the value of the object's $isVisible flag, set by default to TRUE via <code>SetVisible()</code> during <code>SetupDefaults()</code>
* {{l/ver/meth|layout/event|RenderOutput}}:
** if <code>GetShouldDisplay()</code>, then:
** if <code>GetShouldDisplay()</code>, then:
*** <code>RenderDisplay()</code>
*** <code>RenderDisplay()</code>
*** else returns an empty string.
*** else returns an empty string.
* <code>RenderDisplay()</code> returns <code>RenderValue()</code> wrapped in a {{xml/tag|li}} tag.
* {{l/ver/meth|layout/event|RenderDisplay}} returns {{l/ver/meth|layout/event|RenderValue}} wrapped in a {{xml/tag|li}} tag.
* <code>RenderValue()</code> comes from {{l/ver/class|cElement}}
** 2022-07-18 Not sure this should be a thing. If it should, add it to the layout/event docs and make sure podlings are using it when appropriate.
* <code>RenderBranch()</code> comes from {{l/ver/class|cElement}}
* {{l/ver/meth|layout/event|RenderValue}} comes from {{l/ver/class|cElement}}
* <code>RenderTwigs()</code> comes from {{l/ver/class|cElement}}
* {{l/ver/meth|layout/event|RenderBranch}} comes from {{l/ver/class|cElement}}
* {{l/ver/meth|layout/event|RenderTwigs}} comes from {{l/ver/class|cElement}}

Latest revision as of 21:49, 18 July 2022

Ferreteria class ferret\layout\caNavElement
cElementcaNavElementcaLinkElement

Methods

rendering

see layout/event subsystem

  • OnRender() appends RenderOutput()
    • public function OnRender(cEventNodeRender $oe) : void { $oe->Append($this->RenderOutput()); }
  • GetShouldDisplay() returns GetVisible().
  • GetVisible() returns the value of the object's $isVisible flag, set by default to TRUE via SetVisible() during SetupDefaults()
  • RenderOutput():
    • if GetShouldDisplay(), then:
      • RenderDisplay()
      • else returns an empty string.
  • RenderDisplay() returns RenderValue() wrapped in a <li> tag.
    • 2022-07-18 Not sure this should be a thing. If it should, add it to the layout/event docs and make sure podlings are using it when appropriate.
  • RenderValue() comes from cElement
  • RenderBranch() comes from cElement
  • RenderTwigs() comes from cElement