Генерация тега keywords
@return Tag
1784
public function keywords($default = null)
  {
    if (!$k = $this->getKeywords()) {
      $d = $default ?: $this->getDefaultKeywords();
      $k = is_null($d) ? $this->getTitle() : $d;
    }

    return new Tag('meta', null, array('name' => 'keywords', 'content' => $k), true);
  }
1288462
protected function tagName() {
        $tok = $this->scanner->current();
        if (!ctype_alpha($tok)) {
            return false;
        }

        // We know this is at least one char.
        $name = strtolower($this->scanner->charsWhile(":_-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"));
        $attributes = array();
        $selfClose = false;

        // Handle attribute parse exceptions here so that we can
        // react by trying to build a sensible parse tree.
        try {
            do {
                $this->scanner->whitespace();
                $this->attribute($attributes);
            } while (!$this->isTagEnd($selfClose));
        } catch (HTML5_Parser_Exception $e) {
            $selfClose = false;
        }

        $mode = $this->events->startTag($name, $attributes, $selfClose);
        // Should we do this? What does this buy that selfClose doesn't?
        if ($selfClose) {
            $this->events->endTag($name);
        } elseif (is_int($mode)) {
            // fprintf(STDOUT, "Event response says move into mode %d for tag %s", $mode, $name);
            $this->setTextMode($mode, $name);
        }

        $this->scanner->next();

        return true;
    }
877366
public function findTags()
    {
        $tags = [];
        foreach ($this->getDefinitions() as $id => $definition) {
            $tags = array_merge(array_keys($definition->getTags()), $tags);
        }

        return array_unique($tags);
    }
1019236
public function getTagKeyword($tag)
    {
        if (!$tag instanceof Tag) {
            try {
                $tag = $this->tagsService->loadTag($tag);
            } catch (NotFoundException $e) {
                return '';
            }
        }

        return $this->translationHelper->getTranslatedByMethod($tag, 'getKeyword');
    }
47626
public function getTagsList()
    {
        $return = "";
        $tags = $this->Tags()->column("Title");
        
        $this->extend("updateTagsList", $tags);
        
        return implode(
            $this->config()->list_seperator,
            $tags
        );
    }
994548
protected function getInputTag()
    {
        $tag = parent::getInputTag();

        if ($this->name !== null) {
            $tag->name = $this->name;
        }

        return $tag;
    }
1113337
public function getSeoTags() {
        if($this->owner->seo) {
            $seo = $this->owner->seo->attributes;
            return array_filter(array_intersect_key($seo, array_flip(['meta_title', 'meta_keywords', 'meta_description'])));
        } else {
            return [];
        }
    }
805009
public function metaKeywords()
    {
        $metaKeywords = $this->getMetaKeywords();

        if (!$metaKeywords && $type = $this->getType()) {
            $metaKeywords = $type->getMetaKeywords();
        }

        if (!$metaKeywords) {
            $metaKeywords = $this->getTags();
        }

        return $metaKeywords;
    }
710461
protected function setSeoTags()
    {
        global $APPLICATION;

        if ($this->arParams['SET_SEO_TAGS'] !== 'Y')
        {
            return false;
        }

        if ($this->arResult['SEO_TAGS']['TITLE'])
        {
            $APPLICATION->SetPageProperty('title', $this->arResult['SEO_TAGS']['TITLE']);
        }

        if ($this->arResult['SEO_TAGS']['DESCRIPTION'])
        {
            $APPLICATION->SetPageProperty('description', $this->arResult['SEO_TAGS']['DESCRIPTION']);
        }

        if ($this->arResult['SEO_TAGS']['KEYWORDS'])
        {
            $APPLICATION->SetPageProperty('keywords', $this->arResult['SEO_TAGS']['KEYWORDS']);
        }
    }
1005079
protected function getInputTag()
    {
        $input = new SwatHtmlTag('input');
        $input->type = 'hidden';
        // initial value is blank, value is set by JavaScript
        $input->value = '';
        $input->id = $this->id . '_input';

        return $input;
    }
413066
public function paramTags()
    {
        if (isset($this->_tags['@param'])) {
            if (is_array($this->_tags['@param'])) {
                return $this->_tags['@param'];
            } else {
                return array($this->_tags['@param']);
            }
        } else {
            return NULL;
        }
    }
837816
public function actionSuggestTags()
	{
		if(isset($_GET['q']) && ($keyword=trim($_GET['q']))!=='')
		{
			$tags=Tag::model()->suggestTags($keyword);
			if($tags!==array())
				echo implode("\n",$tags);
		}
	}
1338663
protected function getContainerTag()
    {
        if ($this->container_tag === null) {
            $tag = new SwatHtmlTag('div');
        } else {
            $tag = $this->container_tag;
        }

        $tag->id = $this->id;
        $tag->class = $this->getCSSClassString();
        return $tag;
    }
945125
protected function tagMeta()
	{
		// Initialize string
		$html = '';

		// Prevent robots from crawling and indexing the site if not in production mode
		$this->addRobots();

		// Force IE compatibility if option is active
		$this->addIeEdge();

		// Add viewport meta tag for responsive design if option is active
		$this->addResponsive();

		// Add tags for Open Graph if option is active
		$this->addFacebook();

		// Add tags for Twitter Card if option is active
		$this->addTwitter();

		// Add all manually defined meta tags
		foreach ($this->meta as $type => $val)
		{
			foreach ($val as $value => $content)
			{
				// Check if values are defined
				if ($value && $content)
				{
					// Link to a public file
					if (File::isFile(public_path($content)))
					{
						$content = asset($content);
					}

					// Return tag for each registered meta
					$html .= '<meta '.$type.'="'.$value.'" content="'.$content.'">' . "\n\t";
				}
			}
		}

		// Return complete string
		return $html;
	}
814856
public function show()
    {
        return self::tag($this->tagname, $this->attrib, $this->content, array_merge(self::$common_attrib, $this->allowed));
    }
705753
public function getTags()
    {
        if (!$this->tags) {
            $this->tags = array();

            foreach ($this->events as $event) {
                $this->tags = array_merge($this->tags, $event->getTags());
            }

            $this->tags = array_values(array_unique($this->tags));
        }

        return $this->tags;
    }
13873
public function getPageKeywords()
    {
        if (!$this->parser) {
            return;
        }

        $node = $this->parser->find('meta[name=keywords]', 0);

        if ($node) {
            return $node->getAttribute('content');
        }
    }