Suggests tag name by class name.

@return string
975025
private function suggestTagName()
    {
        $class_name = get_class($this);
        $parts = explode('\\', $class_name);
        $base_name = array_pop($parts);
        return ($base_name === 'HtmlTag') ? 'div' : strtolower($base_name);
    }
1057047
public function getClassNameForDomain()
    {
        $className = str_replace(array('-', ' '), '', ucwords(strtolower($this->getDomain())));

        if (is_numeric(mb_substr($className, 0, 1))) {
            $className = 'N'.$className;
        }

        return $className;
    }
1205161
public function UpdateTags()
    {
        $siteTree = DataObject::getSchema()->tableName(SiteTree::class);
        $taxonomy = DataObject::getSchema()->tableName(TaxonomyTerm::class);

        $tags = TaxonomyTerm::get()
            ->innerJoin('BasePage_Terms', sprintf('"%s"."ID"="BasePage_Terms"."TaxonomyTermID"', $taxonomy))
            ->innerJoin(
                $siteTree,
                sprintf(
                    '"%s"."ID" = "BasePage_Terms"."BasePageID" AND "%s"."ParentID" = \'%d\'',
                    $siteTree,
                    $siteTree,
                    $this->ID
                )
            )
            ->sort('Name');

        return $tags;
    }
226679
public function addClass( string $class ): Tag
    {

        if ( ! isset( $this->attributes['class'] ) ) {
            $this->attributes['class'] = $class;
        } else {
            $this->attributes['class'] .= " $class";
        }

        return $this;
    }
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;
    }
4632
protected function getInputTag()
    {
        // We do not use a 'button' element because it is broken differently in
        // different versions of Internet Explorer

        $tag = new SwatHtmlTag('input');

        $tag->type = 'submit';
        $tag->name = $this->id;
        $tag->id = $this->id;
        $tag->value = $this->title;
        $tag->class = $this->getCSSClassString();
        $tag->tabindex = $this->tab_index;
        $tag->accesskey = $this->access_key;

        if (!$this->isSensitive()) {
            $tag->disabled = 'disabled';
        }

        return $tag;
    }
708846
public function asTagged(): TaggedType
    {
        if (!$this->_element instanceof TaggedType) {
            throw new \UnexpectedValueException(
                "Tagged element expected, got " . $this->_typeDescriptorString());
        }
        return $this->_element;
    }
415487
public function getAllElementClassContentClassnames()
    {
        $classnames = array_filter(
            $this->getAllClassContentClassnames(),
            function ($classname) {
                return false !== strpos(
                    $classname,
                    AbstractClassContent::CLASSCONTENT_BASE_NAMESPACE.'Element\\'
                );
            }
        );

        $classnames[] = AbstractClassContent::CLASSCONTENT_BASE_NAMESPACE.'ContentSet';

        return $classnames;
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
532661
public function getWrapperClassNames()
    {
        $classes = $this->styles('navbar');
        
        $classes[] = $this->style('navbar', sprintf('expand-%s', $this->ExpandOn));
        
        if ($this->Background) {
            $classes[] = $this->style('background', $this->Background);
        }
        
        if ($this->Foreground) {
            $classes[] = $this->style('navbar', sprintf('fg-%s', $this->Foreground));
        }
        
        if ($this->Position) {
            $classes[] = $this->style('position', $this->Position);
        }
        
        $this->extend('updateWrapperClassNames', $classes);
        
        return $classes;
    }
1065552
public function suggestTags($keyword, $limit = 20)
    {
        $tags = Tag::find()
            ->where('name LIKE :keyword', [
                ':keyword' => '%' . strtr($keyword, ['%'=>'\%', '_'=>'\_', '\\'=>'\\\\']) . '%'
            ])
            ->orderBy('frequency DESC, Name')
            ->limit($limit)
            ->all();
        $names = [];
        foreach($tags as $tag)
            $names[] = $tag->name;
        return $names;
    }
1180816
protected function setTagsHints()
	{
		$this->hints['attributeDefaultValue'] = 0;
		$this->hints['namespaces']            = 0;
		foreach ($this->config['tags'] as $tagName => $tagConfig)
		{
			$this->hints['namespaces'] |= (strpos($tagName, ':') !== false);
			$this->setTagAttributesHints($tagConfig);
		}
	}
736607
protected function tagLink()
	{
		// Initialize string
		$html = '';

		// Add favicon link tags
		$this->addFavicon();

		// Add stylesheets link tags
		$this->addStyleSheets();

		foreach ($this->link as $link)
		{
			if (array_key_exists(1, $link) && $link[1] && array_key_exists(0, $link) && $link[0])
			{
				// Initialize starting string for conditional comments
				$start_cond = '';
				// Initialize ending string for conditional comments
				$end_cond = '';
				// Initialize string for type attribute
				$type = '';
				// Initialize string for other attributes
				$attr = '';

				// Check for conditional comments
				if (array_key_exists(4, $link) && $link[4])
				{
					// Set starting string for conditional comments
					$start_cond = '<!--[if '.$link[4].']>';
					// Set ending string for conditional comments
					$end_cond = '<![endif]-->';
				}

				// Check for attributes
				if (array_key_exists(3, $link) && is_array($link[3]))
				{
					foreach ($link[3] as $name => $content)
					{
						// Check if values are not empty
						if ($name && $content)
						{
							// Set strings for each attribute
							$attr .= ' '.$name.'="'.$content.'"';
						}
					}
				}

				// Check for type attribute
				if (array_key_exists(2, $link) && $link[2])
				{
					// Set string for type attribute
					$type = ' type="'.$link[2].'"';
				}

				// Return tag for each registered link
				$html .= $start_cond.'<link rel="'.$link[0].'" href="'.$link[1].'"'.$type.$attr.'>'.$end_cond . "\n\t";
			}
		}

		// Return complete string
		return $html;
	}
372653
public function markingClasses() {
        $classes='';
        if(!$this->isExpanded()) {
            $classes .= " unexpanded jstree-closed";
        }
        if($this->isTreeOpened()) {
            if($this->numChildren() > 0) $classes .= " jstree-open";
        } else {
            $classes .= " closed";
        }
        return $classes;
    }
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;
    }
346910
protected function getHint()
	{
		if (isset($this->hintText))
		{
			$htmlOptions = $this->hintOptions;

			if (isset($htmlOptions['class']))
				$htmlOptions['class'] .= ' help-block';
			else
				$htmlOptions['class'] = 'help-block';

			return CHtml::tag('p', $htmlOptions, $this->hintText);
		} else
			return '';
	}
994548
protected function getInputTag()
    {
        $tag = parent::getInputTag();

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

        return $tag;
    }