Back to HtmlDocument class

Method addCustomTag

public \Joomla\CMS\Document\HtmlDocument
addCustomTag
(mixed $html)
Adds a custom HTML string to the head block
Parameters
  • string $html The HTML to add to the head
Returns
  • \Joomla\CMS\Document\HtmlDocument instance of $this to allow chaining
Since
  • 1.7.0
Class: HtmlDocument
Project: Joomla

Method addCustomTag - Source code

/**
 * Adds a custom HTML string to the head block
 *
 * @param   string  $html  The HTML to add to the head
 *
 * @return  HtmlDocument instance of $this to allow chaining
 *
 * @since   1.7.0
 */
public function addCustomTag($html)
{
    $this->_custom[] = trim($html);
    return $this;
}