Back to HtmlDocument class

Method resetHeadDatum

private void
resetHeadDatum
(mixed $type)
Reset a part the HTML document head data
Parameters
  • string $type type of the heads elements to reset
Returns
  • void
Since
  • 3.7.0
Class: HtmlDocument
Project: Joomla

Method resetHeadDatum - Source code

/**
 * Reset a part the HTML document head data
 *
 * @param   string  $type  type of the heads elements to reset
 *
 * @return  void
 *
 * @since   3.7.0
 */
private function resetHeadDatum($type)
{
    switch ($type) {
        case 'title':
        case 'description':
        case 'link':
            $this->{$type} = '';
            break;
        case 'metaTags':
        case 'links':
        case 'styleSheets':
        case 'style':
        case 'scripts':
        case 'script':
        case 'custom':
            $realType = '_' . $type;
            $this->{$realType} = array();
            break;
        case 'scriptOptions':
            $this->{$type} = array();
            break;
    }
}