Returns the description from the Tag with the version prepended when applicable.

@todo the version should not be prepended here but in templates; remove this.
@return string
968959
protected function getDescription(TagDescriptor $tag)
    {
        $description = '';

        if ($tag instanceof VersionDescriptor ||
            $tag instanceof DeprecatedDescriptor ||
            $tag instanceof SinceDescriptor
        ) {
            $description .= $tag->getVersion() . ' ';
        }

        $description .= $tag->getDescription();

        return trim($description);
    }
321737
public function getDescription()
    {
        $nodes = $this->html->findTags('meta');
        foreach ($nodes as $node) {
            if (strtolower($node->getAttribute('name')) == 'description') {
                return trim($node->getAttribute('content'));
            }
        }

        return null;
    }
958824
public function render(): string
    {
        $tag = $this->wrapperTagName
            ? new Tag($this->wrapperTagName, $this->htmlAttributes)
            : null;

        $contents = array_map([$this, 'renderItem'], $this->items);

        $wrappedContents = $tag ? $tag->withContents($contents) : implode('', $contents);

        $menu = $this->prepend.$wrappedContents.$this->append;

        if (! empty($this->wrap)) {
            return Tag::make($this->wrap[0], new Attributes($this->wrap[1]))->withContents($menu);
        }

        return $menu;
    }
418833
private function createNewSortedTagsContent(): string
    {
        $file = $this->file;
        $eolChar = $file->getEolChar();
        $newContent = '';
        $prevTagContent = '';
        $sortedTags = $this->sortTokens($this->getTagTokens());
        $tagCounts = $this->docTagHelper->getTagCounts($sortedTags);
        $withReturn = false;

        foreach ($sortedTags as $tag) {
            $lineStartingPadding = str_pad('', $tag['column'] - 3, ' ');
            $thisTagContent = $tag['content'];
            $isReturn = $thisTagContent === '@return';

            $isGroupSwitch =
                // Did we switch the tag ...
                $prevTagContent && ($prevTagContent !== $thisTagContent) &&
                // ... but do we skip singles or are we entering the return block which should contain only 1 tag.
                (($tagCounts[$thisTagContent] !== 1) || ($isReturn && !$withReturn));

            // Insert new line between groups.
            if ($isGroupSwitch) {
                $newContent .= $lineStartingPadding . '*' . $eolChar;
            }

            // Create the new Tag.
            // WARNING We do not need a line break in the tag summary.
            $newContent .= $lineStartingPadding . '* ' . trim($thisTagContent);

            if ($tag['contents']) {
                $prevLine = $tag['line'];
                foreach ($tag['contents'] as $subToken) {
                    // If we have a line switch, we need to create the correct indentation from before ...
                    if ($withLineSwitch = $subToken['line'] > $prevLine) {
                        $newContent .= $eolChar .
                            $lineStartingPadding . '*' .
                            str_repeat(' ', $subToken['column'] - strlen($lineStartingPadding) - 2);

                        $prevLine = $subToken['line'];
                    }

                    // ... if we have no line switch, then an additional whitespace is enough.
                    $newContent .= ($withLineSwitch ? '' : ' ') . $subToken['content'];
                }
            }

            $newContent .= $eolChar;

            $prevTagContent = $thisTagContent;
            $withReturn = $isReturn;
        }

        $newContent .= $lineStartingPadding . '*/' . $eolChar;

        return $newContent;
    }
166566
public function toString()
    {
        if ($this->hidden) {
            return '';
        }
        
        $result = trim($this->getName() . ' ' . (!empty($this->version) && !$this->version->hidden ? $this->getVersion() : ''));

        if (empty($result) && isset($this->using)) {
            return $this->using->toString();
        }

        return $result;
    }
262509
private function getFormattedText(): string {
        $this->removeNodesWithNegativeScores($this->article()->getTopNode());
        $this->convertLinksToText($this->article()->getTopNode());
        $this->replaceTagsWithText($this->article()->getTopNode());
        $this->removeParagraphsWithFewWords($this->article()->getTopNode());

        return $this->convertToText($this->article()->getTopNode());
    }
710697
public function get_description() {
        $allhelp = array();
        if ($this->aggregation != GRADE_AGGREGATE_SUM) {
            $aggrstrings = grade_helper::get_aggregation_strings();
            $allhelp[] = $aggrstrings[$this->aggregation];
        }

        if ($this->droplow && $this->can_apply_limit_rules()) {
            $allhelp[] = get_string('droplowestvalues', 'grades', $this->droplow);
        }
        if ($this->keephigh && $this->can_apply_limit_rules()) {
            $allhelp[] = get_string('keephighestvalues', 'grades', $this->keephigh);
        }
        if (!$this->aggregateonlygraded) {
            $allhelp[] = get_string('aggregatenotonlygraded', 'grades');
        }
        if ($allhelp) {
            return implode('. ', $allhelp) . '.';
        }
        return '';
    }
961191
public function getFormVersion()
    {
        if (empty($this->formVersion)) {
            foreach ($this->_xml->children('h', true)->head->children()->model->instance->children() as $element) {
                if (!empty($element->attributes()->version)) {
                    $this->formVersion = $element->attributes()->version;
                    break;
                }
            }
        }

        return $this->formVersion;

    }
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;
    }
616790
public function getTag() : ?string 
    {
        if ( ! $this->hasTag()) {
            $this->setTag($this->getDefaultTag());
        }
        return $this->tag;
    }
243283
public function getFullNativeDescription()
    {
        $region = $this->getRegionName();
        $variant = $this->getVariantName();

        return $this->getFullNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : '');
    }
1055142
public static function getVersion()
	{
		$match = array();
		$content = @file_get_contents( dirname( __DIR__ ) . DIRECTORY_SEPARATOR . 'ext_emconf.php' );

		if( preg_match( "/'version' => '([^']+)'/", $content, $match ) === 1 ) {
			return $match[1];
		}

		return '';
	}
752962
public function getDefaultOGDescription()
    {
        // Use MetaDescription if set
        if ($this->owner->MetaDescription) {
            $description = trim($this->owner->MetaDescription);
            if (!empty($description)) {
                return $description;
            }
        }

        // Fall back to Content
        if ($this->owner->Content) {
            $description = trim($this->owner->obj('Content')->Summary(20, 5));
            if (!empty($description)) {
                return $description;
            }
        }

        return false;
    }
1151983
public function getVersion()
    {
        /** @var Collection $version */
        $version = $this->getTags()->get('version', new Collection());
        if ($version->count() !== 0) {
            return $version;
        }

        $inheritedElement = $this->getInheritedElement();
        if ($inheritedElement) {
            return $inheritedElement->getVersion();
        }

        return new Collection();
    }
135381
public function getDisplayVersion()
    {
        if ($this->isDevVersion()) {
            return t(/*i18n: %s is a version*/'%s development series', substr($this->version, strlen(static::DEV_PREFIX)));
        } else {
            return $this->version;
        }
    }
1040378
public function getRef()
    {
        if (is_null($this->ref)) {
            $tags = $this->tags;
            sort($tags);
            $this->ref = md5(implode('-', $tags));
        }
        return $this->ref;
    }
334382
public function toString()
    {
        return trim($this->getName() . ' ' . (!empty($this->version) && !$this->version->hidden ? $this->getVersion() : ''));
    }