HeadModule::addTag PHP Method

addTag() public method

Adds a new tag to the head.
public addTag ( $Tag, $Properties, $Content = null, $Index = null )
        public function addTag($Tag, $Properties, $Content = null, $Index = null)
        {
            $Tag = array_merge(array(self::TAG_KEY => strtolower($Tag)), array_change_key_case($Properties));
            if ($Content) {
                $Tag[self::CONTENT_KEY] = $Content;
            }
            if (!array_key_exists(self::SORT_KEY, $Tag)) {
                $Tag[self::SORT_KEY] = count($this->_Tags);
            }
            if ($Index !== null) {
                $this->_Tags[$Index] = $Tag;
            }
            // Make sure this item has not already been added.
            if (!in_array($Tag, $this->_Tags)) {
                $this->_Tags[] = $Tag;
            }
        }