Ferreteria/v0.5/@cls/caTag: Difference between revisions
< Ferreteria | v0.5 | @cls
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
Adds the following: | Adds the following: | ||
* OnRender() calls RenderOutput() | * OnRender() calls RenderOutput() | ||
* two methods for rendering pieces of an HTML tag | * two abstract methods for rendering pieces of an HTML tag (GetTagName(), GetTagTail()) | ||
* a method to assemble a tag-opener from those two | * a method to assemble a tag-opener from those two (GetTagOpen()) | ||
<syntaxhighlight lang=php> | <syntaxhighlight lang=php> | ||
protected function GetTagOpen() : string { /* build output from GetTagName() and GetTagTail() */ } | protected function GetTagOpen() : string { /* build output from GetTagName() and GetTagTail() */ } |
Revision as of 15:05, 18 July 2022
cElement | → caTag |
→ * \ tag \ caClosable |
Methods
Adds the following:
- OnRender() calls RenderOutput()
- two abstract methods for rendering pieces of an HTML tag (GetTagName(), GetTagTail())
- a method to assemble a tag-opener from those two (GetTagOpen())
protected function GetTagOpen() : string { /* build output from GetTagName() and GetTagTail() */ }
abstract protected function GetTagName() : string; // what goes <here></here> or <here [...] />
abstract protected function GetTagTail() : string; // attributes