Return a tag

@return mixed
176056
public function evaluate()
    {
        $tagName = $this->getTagName();
        $omitClosingTag = $this->getOmitClosingTag();
        $selfClosingTag = $this->isSelfClosingTag($tagName);
        $content = '';
        if (!$omitClosingTag && !$selfClosingTag) {
            $content = $this->fusionValue('content');
        }
        return '<' . $tagName . $this->fusionValue('attributes') . ($selfClosingTag ? ' /' : '') . '>' . (!$omitClosingTag && !$selfClosingTag ? $content . '</' . $tagName . '>' : '');
    }
972052
public function tag($tag)
    {
        $route = $this->factory->createRoute($this, null, array());

        $this->addRoute($route);

        return $route->tag($tag);
    }
769581
public function getCurrentTag()
    {
        /**
         * @var Blog $dataRecord
         */
        $dataRecord = $this->dataRecord;
        $tag = $this->request->param('Tag');
        if ($tag) {
            $filter = URLSegmentFilter::create();
            // url encode unless it's multibyte (already pre-encoded in the database)
            // see https://github.com/silverstripe/silverstripe-cms/pull/2384
            if (!$filter->getAllowMultibyte()) {
                $tag = rawurlencode($tag);
            }

            return $dataRecord->Tags()
                ->filter('URLSegment', $tag)
                ->first();
        }
        return null;
    }
1003918
public function getHTML() {
        $tag = "<" . $this->name;
        $q = $this->quoteType;

        //build attribute strings
        foreach( $this->attrs as $name=>$value ) {
            //if true, such as CHECKED, we just add the name
            if( $value === true ) {
                $tag .= " $name";
            } else if( is_string( $value ) ) { //if it's a string, we add attr="value"
                $tag .= " {$name}={$q}{$value}{$q}";
            }
        }

        //short tag? close it and return
        if( $this->isShortTag ) {
            $tag .= ' />';
            
            return $tag;
        }

        //not a short tag, close it
        $tag .= '>';

        //add the children if they exist
        if( $this->hasChildren() ) {
            foreach( $this->getChildren() as $child ) {
                $tag .= $child->getHTML();
            }
        }

        //closing tag
        $tag .= "</{$this->name}>";

        return $tag;
    }
920104
protected function getSensitiveTag()
    {
        $tag = new SwatHtmlTag('a');

        $tag->id = $this->id;
        $tag->class = $this->getCSSClassString();

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

        if ($this->value === null) {
            $tag->href = $this->link;
        } elseif (is_array($this->value)) {
            $tag->href = vsprintf($this->link, $this->value);
        } else {
            $tag->href = sprintf($this->link, $this->value);
        }

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

        $tag->accesskey = $this->access_key;

        return $tag;
    }
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;
    }
853009
public function getTag($tag)
    {
        if (!isset($this->tags[ $tag ])) {
            throw new \OutOfBoundsException("Tag {$tag} does not exist.");
        }

        return $this->tags[ $tag ];
    }
68117
public function render() : string
    {
        if ($this->isVoid) {
            return $this->renderOpeningTag();
        }

        return $this->renderOpeningTag() . $this->content . $this->renderClosingTag();
    }
814856
public function show()
    {
        return self::tag($this->tagname, $this->attrib, $this->content, array_merge(self::$common_attrib, $this->allowed));
    }
697405
public function getTagsFromSearchResult()
    {
        $tags = $tagsForResult = array();
        $tagChar = $this->pObj->extConf['prePostTagChar'];
        $tagDivider = $tagChar . ',' . $tagChar;

        if ($this->sphinxSearchEnabled()) {
            $tagsForResult = $this->getTagsFromSphinx();
        } else {
            $tagsForResult = $this->getTagsFromMySQL();
        }
        foreach ($tagsForResult as $tagSet) {
            $tagSet = explode($tagDivider, trim($tagSet, $tagChar));
            foreach ($tagSet as $tag) {
                $tags[$tag] += 1;
            }
        }
        return $tags;
    }
121567
public function getTagged($tag)
	{
		$services = array();

		if (isset($this->tags[$tag]))
		{
			foreach ($this->tags[$tag] as $service)
			{
				$services[] = $this->get($service);
			}
		}

		return $services;
	}
1056103
public function getTag($tag)
    {
        return isset($this->tags[$tag]) ? $this->tags[$tag] : null;
    }
484497
protected function getFormTag()
    {
        $form_tag = new SwatHtmlTag('form');

        $form_tag->addAttributes(array(
            'id' => $this->id,
            'method' => $this->method,
            'enctype' => $this->encoding_type,
            'accept-charset' => $this->accept_charset,
            'action' => $this->action,
            'class' => $this->getCSSClassString()
        ));

        // we're going to validate data on the server, so turn off HTML5
        // form validation
        $form_tag->novalidate = 'novalidate';

        return $form_tag;
    }
446574
public function getTagsArray()
    {
        $result = [];

        foreach($this->tags as $tag) {
            $result[] = $tag->toArray();
        }

        return $result;
    }
549144
public function getTag(string $name, $default = null)
    {
        return isset($this->tags[$name]) ? $this->tags[$name] : $default;
    }
1198199
protected function tagMisc()
	{
		// Initialize string
		$html = '';

		// Add conditional script for IE compatibility with HTML5 if option is active
		$this->addShiv();

		// Add analytics script if option is active and mode is production
		$this->addAnalytics();

 		foreach ($this->misc as $line)
 		{
 			// Return each item
 			$html .= $line . "\n\t";
 		}

 		// Return complete string
 		return $html;
	}
1053787
public function getTagList(){
	    if (!$this->access_token && !$this->checkAuth()) return false;
	    $result = $this->http_get(self::API_URL_PREFIX.self::TAG_LIST_URL.'access_token='.$this->access_token);
	    if ($result)
	    {
	        $json = json_decode($result,true);
	        if (!$json || !empty($json['errcode'])) {
	            $this->errCode = $json['errcode'];
	            $this->errMsg = $json['errmsg'];
	            return false;
	        }
	        return $json;
	    }
	    return false;
	}