Ferreteria/v0.5/@cls/cElement: Difference between revisions
< Ferreteria | v0.5 | @cls
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
* '''file''': {{l/ferreteria/code|layout/elem/1.php}} | * '''file''': {{l/ferreteria/code|layout/elem/1.php}} | ||
==Methods== | ==Methods== | ||
===rendering=== | ===events=== | ||
General event-handling is defined by {{l/ver/class|tExecutableTree}}. | |||
===event: rendering=== | |||
* <syntaxhighlight lang=php inline>public function RenderOutput() : string { return $this->RenderValue(); }</syntaxhighlight> | * <syntaxhighlight lang=php inline>public function RenderOutput() : string { return $this->RenderValue(); }</syntaxhighlight> | ||
* <syntaxhighlight lang=php inline>protected function RenderValue() : string { return $this->RenderBranch(); }</syntaxhighlight> | * <syntaxhighlight lang=php inline>protected function RenderValue() : string { return $this->RenderBranch(); }</syntaxhighlight> | ||
* <syntaxhighlight lang=php inline>protected function RenderBranch() : string { return $this->RenderTwigs(); | * <syntaxhighlight lang=php inline>protected function RenderBranch() : string { /*...*/ }</syntaxhighlight>: | ||
** <syntaxhighlight lang=php inline>if $this->ShouldDoTwigs()</syntaxhighlight>, then: | |||
*** <syntaxhighlight lang=php inline>return $this->RenderTwigs();</syntaxhighlight> | |||
*** else return empty string | |||
* <syntaxhighlight lang=php inline>protected function RenderTwigs() : string { /* call twig->RenderOutput() for each twig */ }</syntaxhighlight> | * <syntaxhighlight lang=php inline>protected function RenderTwigs() : string { /* call twig->RenderOutput() for each twig */ }</syntaxhighlight> | ||
* <syntaxhighlight lang=php inline>protected function ShouldDoTwigs() : bool { return TRUE; }</syntaxhighlight> |
Revision as of 17:03, 12 July 2022
tExecutableTree | → cElement |
→ caContentHeader |
- file: layout/elem/1.php
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; }