Tag Getter for use in templates.

@return null|BlogTag
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;
    }
902435
public function getIsNode()
	{
		return ! is_null( $this->domNode ) && isset( DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ] );
	}
821356
public function getEmisor()
    {
        if (!$this->xml) {
            return false;
        }
        $RE = $this->xml->getElementsByTagName('RE')->item(0);
        return $RE ? $RE->nodeValue : false;
    }
1158156
protected function get_tag_collection() {
        if (empty($this->tagsoptions['tagcollid']) && (empty($this->tagsoptions['itemtype']) ||
                empty($this->tagsoptions['component']))) {
            debugging('You need to specify \'itemtype\' and \'component\' of the tagged '
                    . 'area in the tags form element options',
                    DEBUG_DEVELOPER);
        }
        if (!empty($this->tagsoptions['tagcollid'])) {
            return $this->tagsoptions['tagcollid'];
        }
        if ($this->tagsoptions['itemtype']) {
            $this->tagsoptions['tagcollid'] = core_tag_area::get_collection($this->tagsoptions['component'],
                    $this->tagsoptions['itemtype']);
        } else {
            $this->tagsoptions['tagcollid'] = core_tag_collection::get_default();
        }
        return $this->tagsoptions['tagcollid'];
    }
1234943
protected function getCache()
    {
        $cache = $this->getCacheDriver();

        return $this->cacheTags ? $cache->tags($this->cacheTags) : $cache;
    }
814856
public function show()
    {
        return self::tag($this->tagname, $this->attrib, $this->content, array_merge(self::$common_attrib, $this->allowed));
    }
1320680
public function getTags()
    {
        if (!$this->_extendedBackend) {
            Zend_Cache::throwException(self::BACKEND_NOT_IMPLEMENTS_EXTENDED_IF);
        }
        if (!($this->_backendCapabilities['tags'])) {
            Zend_Cache::throwException(self::BACKEND_NOT_SUPPORTS_TAG);
        }
        return $this->_backend->getTags();
    }
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;
    }
534592
public function getTag($tagName)
    {
        foreach ($this->tags as $tag) {
            if ($tag['name'] === $tagName) {
                return $tag;
            }
        }

        throw new \InvalidArgumentException(sprintf(
            'Unknown tag "%s"', $tagName
        ));
    }
630565
public function getAssignedTags()
    {
        if ($this->_assignedTags === null) {
            $ids = ArrayHelper::getColumn($this->getContextConfigValue($this->varName, []), 'value');
            $this->_assignedTags = Tag::find()->where(['in','id', $ids])->indexBy('name')->all();
        }
        
        return $this->_assignedTags;
    }
215798
public function getTags($name = null)
  {
    if (!$name) return $this->tags;
    
    return isset($this->tags[$name]) ? $this->tags[$name] : [];
  }
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;
    }
604948
public function getTagByUrl($request)
    {
        $this->resort();
        foreach ($this->requests as $url=>$tag) {
            if (0 === strrpos($request, $url)) return $tag;
        }
        return null;
    }
825422
public function getTagsLocator() {
		if ($this->tagsLocator !== null) {
			return $this->tagsLocator;
		}
		
		$container = new Container();

		$container->header = function() {
			return new Tag('div', null, 'topology-header');
		};
		
		$container->body = function() {
			return new Tag('div', null, 'topology-body');
		};
		
		$container->footer = function() {
			return new Tag('div', null, 'topology-footer');
		};
		
		$container->link = function() {
			return new Tag('div', null, 'topology-link');
		};
		
		$container->linkUp = function() {
			return new Tag('div', null, 'topology-link-up');
		};
		
		$container->linkDown = function() {
			return new Tag('div', null, 'topology-link-down');
		};
		
		$container->wrapper = function() {
			return new Tag('div', null, 'topology-wrapper');
		};
		
		$container->label = function() {
			return new Tag('span', null, 'topology-label'); 
		};
		
		$container->badge = function() {
			return new Tag('span', null, 'topology-badge'); 
		};

		$this->tagsLocator = $container;
		return $container;
	}
447826
public function getDocBlockTag() {
    $doc_comment = $this->getFunction()->getDocComment();
    return $doc_comment ? $doc_comment->getParameter($this->name->getText()) : NULL;
  }
1253227
protected function getTitleTag()
    {
        $label_tag = new SwatHtmlTag('label');

        if ($this->title !== null) {
            if ($this->show_colon) {
                $label_tag->setContent(
                    sprintf(Swat::_('%s: '), $this->title),
                    $this->title_content_type
                );
            } else {
                $label_tag->setContent($this->title, $this->title_content_type);
            }
        }

        $label_tag->for = $this->getFocusableHtmlId();
        $label_tag->accesskey = $this->access_key;

        return $label_tag;
    }
922717
public function getUrlByTag($tagName)
    {
        if (isset($this->urls[$tagName])) {
            return $this->urls[$tagName];
        } else {
            return null;
        }
    }