TemplateTag::outerHTML - jcobban/Genealogy GitHub Wiki

$tag->outerHTML($replace)

Up: class TemplateTag

Returns a string from the beginning of the opening tag to the end of the closing tag. Note the capitalization of the method name which matches the equivalent attribute in JavaScript. This function may also be accessed using the attribute $tag->outerHTML.

parameter description
$replace If this is null, which is the default, then the tag is not modified. If the value is a string then the tag is replaced by the string. Using outerHTML is therefore a more intuitive way of replacing a tag with a string.

For example:

    $html           = $tag->outerHTML();
    $html           = $tag->outerHTML;          // equivalent
    $tag->outerHTML($string);
    $tag->outerHTML = $string;                  // equivalent

Next: $tag->innerHTML()