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

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:
{| style="border: solid 1px grey; background: #eef;"
{| style="border: solid 1px grey; background: #eef;"
|-
|-
| {{l/ver/class|tExecutableTwig}} &rarr;
|
 
{|
|-
| {{l/ver/class|tExecutableTwig}}
| &rarr;  
| {{l/ver/class|tExecutableTree}}
| {{l/ver/class|tExecutableTree}}
| &rarr; {{l/ver/class|cElement}}
|-
| align=right colspan=3 | {{l/ver/class|tRenderableTree}}
|}
|}
| &rarr;
| {{l/ver/class|cElement}}
|}
* '''file''': {{l/ferreteria/code|layout/elem/trait.php}}
* '''file''': {{l/ferreteria/code|layout/elem/trait.php}}
==About==
==About==
This trait extends {{l/ver/class|tExecutableTwig}} by dispatching events to sub-twigs.
This trait extends {{l/ver/class|tExecutableTwig}} by dispatching events to sub-twigs.
==Methods==
==Methods==
===event dispatch===
===events===
* {{l/ver/meth|layout/event|OnEvent}} calls the following, though the exact order has changed:
* {{l/sub|OnEvent()}} calls these:
** if {{l/ver/meth|layout/event|ShouldDoTwigs}}, then {{l/ver/meth|layout/event|DoEventTwigs}}
** {{l/sub|DoEventTwigs()}} is implemented as you might expect.
** {{l/ver/meth|layout/event|OnEventLocal}}
** {{l/sub|OnEventLocal()}} is inherited from {{l/ver/class|tExecutableTwig}}
* {{l/ver/meth|layout/event|DoEventTwigs}} is implemented as you might expect.
====rendering====
* {{l/ver/meth|layout/event|OnEventLocal}} comes from {{l/ver/class|tExecutableTwig}}
* {{l/sub|RenderValue()}}
===event handlers===
* {{l/sub|RenderBranch()}}
<syntaxhighlight lang=php>
* {{l/sub|RenderTwigs()}}
    protected function OnBuild(cEventNodeFigure $oe) : void {}  // STUB
    protected function OnFigure(cEventNodeFigure $oe) : void { $this->StoreRendered($this->RenderOutput()); }
    protected function OnRender(cEventNodeRender $oe) : void { $oe->Append($this->FetchRendered()); }
</syntaxhighlight>
===events: rendering===
* {{l/sub|StoreRendered()}}
* {{l/sub|FetchRendered()}}
* {{l/sub|RenderOutput()}}

Latest revision as of 19:26, 20 August 2023

Ferreteria trait ferret\layout\tExecutableTree
tExecutableTwig tExecutableTree
tRenderableTree
cElement

About

This trait extends tExecutableTwig by dispatching events to sub-twigs.

Methods

events

rendering