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

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
{| style="border: solid 1px grey; background: #eef;"
{| style="border: solid 1px grey; background: #eef;"
|-
|-
| {{l/ver/class|tExecutableTree}}
|
| &rarr; {{l/ver/class|cElement}}
{{l/ver/class|tExecutableTree}} &rarr;<br>
{{l/ver/class|tRenderableTwig}} &rarr;
| {{l/ver/class|cElement}}
|
|
&rarr; {{l/ver/class|caContentHeader}}<br>
&rarr; {{l/ver/class|caContentHeader}}<br>

Revision as of 16:48, 21 July 2022

Ferreteria class ferret\layout\cElement

tExecutableTree
tRenderableTwig

cElement

caContentHeader
cNavElement
caPageContent
cSectionHeader
html\caTag
caWebPage
login\caWidget

Methods

events

General event-handling is defined by tExecutableTree.

event: rendering

  • public function RenderOutput() : string { return $this->RenderValue(); }
  • protected function RenderValue() : string { return $this->RenderBranch(); }
  • protected function RenderBranch() : string { /*...*/ }:
    • if $this->ShouldDoTwigs(), then:
      • return $this->RenderTwigs();
      • else return empty string
  • protected function RenderTwigs() : string { /* call twig->RenderOutput() for each twig */ }
  • protected function ShouldDoTwigs() : bool { return TRUE; }