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
(Undo revision 3851 by Woozle (talk))
Tag: Undo
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==
===event dispatch===
===events===
* {{l/sub|OnEvent()}}
* {{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}}
** {{l/ver/meth|layout/event|OnEventLocal}}
** {{l/ver/meth|layout/event|OnEventLocal}}
* {{l/ver/meth|layout/event|DoEventTwigs}} is implemented as you might expect.
* {{l/sub|DoEventTwigs()}} is implemented as you might expect.
* {{l/ver/meth|layout/event|OnEventLocal}} comes from {{l/ver/class|tExecutableTwig}}
* {{l/sub|OnEventLocal()}} is inherited from {{l/ver/class|tExecutableTwig}}
===event handlers===
====rendering====
<syntaxhighlight lang=php>
* {{l/sub|RenderValue()}}
    protected function OnBuild(cEventNodeFigure $oe) : void {}  // STUB
* {{l/sub|RenderBranch()}}
    protected function OnFigure(cEventNodeFigure $oe) : void { $this->StoreRendered($this->RenderOutput()); }
* {{l/sub|RenderTwigs()}}
    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:37, 2 December 2022

Ferreteria trait ferret\layout\tExecutableTree
tExecutableTwig tExecutableTree cElement

About

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

Methods

events

rendering