Template::updateTag - jcobban/Genealogy GitHub Wiki
$template->updateTag($elementid, $modifier)
Up: class Template
This method implements a much more powerful substitution facility which exploits the Document Object Model (DOM) of the HTML or XML document represented by the included files.
This method has two parameters:
parameter | description |
---|---|
$elementid | a string which identifies an element in the Document Object Model (DOM) of the template by its 'id' attribute. |
$modifier | an object which describes how the identified element is to be modified. |
This method is exactly equivalent to:
$template‑>getElementById($elementid)‑>update($modifier);
or its more compact equivalent:
$template[$elementid]‑>update($modifier);
These alternatives are clearer about what the program is doing and are therefore recommended. See the documentation for $template‑>getElementById($elementid) and $tag->update($instructions) to understand what this method does.
Next: $template->getDocument()