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

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
(correction)
No edit summary
Line 10: Line 10:
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==
===events===
===event dispatch===
* {{l/ver/meth|layout/event|OnEvent}} calls the following, though the exact order has changed:
* {{l/ver/meth|layout/event|OnEvent}} calls the following, though the exact order has changed:
** if {{l/ver/meth|layout/event|ShouldDoTwigs}}, then {{l/ver/meth|layout/event|DoEventTwigs}}
** if {{l/ver/meth|layout/event|ShouldDoTwigs}}, then {{l/ver/meth|layout/event|DoEventTwigs}}
Line 16: Line 16:
* {{l/ver/meth|layout/event|DoEventTwigs}} is implemented as you might expect.
* {{l/ver/meth|layout/event|DoEventTwigs}} is implemented as you might expect.
* {{l/ver/meth|layout/event|OnEventLocal}} comes from {{l/ver/class|tExecutableTwig}}
* {{l/ver/meth|layout/event|OnEventLocal}} comes from {{l/ver/class|tExecutableTwig}}
====rendering====
===event handlers===
No rendering-specific methods are specified here, so there aren't any defined at this point.
<syntaxhighlight lang=php>
    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()}}

Revision as of 15:25, 2 December 2022

Ferreteria trait ferret\layout\tExecutableTree
tExecutableTwig tExecutableTree cElement

About

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

Methods

event dispatch

event handlers

    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()); }

events: rendering