[getTextAsLink description]
@return [type] [description]
979633
public function getTextAsLink()
    {
        $html = '';
        if($this->type == self::TYPE_CALL)
        {
            $html .= Html::a($this->text,'tel:'.$this->text,['target' => '_blank']);
        }
        else
        {
            $html .= $this->text;
        }
        return $html;
    }
287729
public function getMetaAbsoluteLink()
    {
        if ($this->owner->hasMethod('AbsoluteLink')) {
            return $this->owner->AbsoluteLink();
        } elseif ($this->owner->AbsoluteLink) {
            return $this->owner->AbsoluteLink;
        }
    }
1197789
public function getDescription(): string
    {
        if (\is_array($this->haystack)) {
            $haystack = implode(', ', $this->haystack);
        } else {
            $haystack = $this->haystack;
        }
        return __('must be in "%s"', $haystack);
    }
549734
public function getLinkURL()
    {
        if (!$this->ID) {
            return '';
        }

        $type = $this->Type;
        switch ($type) {
            case 'URL':
                $LinkURL = $this->URL;
                break;
            case 'Email':
                $LinkURL = $this->Email ? "mailto:$this->Email" : null;
                break;
            case 'Phone':
                $LinkURL = $this->Phone ? "tel:$this->Phone" : null;
                break;
            default:
                if ($this->getTypeHasDbField()) {
                    $LinkURL = $this->{$type};
                } else {
                    if ($type && $component = $this->getComponent($type)) {
                        if (!$component->exists()) {
                            $LinkURL = false;
                        } elseif ($component->hasMethod('Link')) {
                            $LinkURL = $component->Link() . $this->Anchor;
                        } else {
                            $LinkURL = "Please implement a Link() method on your dataobject \"$type\"";
                        }
                    }
                }
                break;
        }

        $this->extend('updateLinkURL', $LinkURL);

        return $LinkURL;
    }
619255
public function getLinkMain() {
        if($this->currentPageID()!=0 && $this->class=='CodeBankEditSnippet') {
            return $this->LinkWithSearch(Controller::join_links($this->Link('show'), $this->currentPageID()));
        }else if($this->currentPageID()!=0 && $this->class=='CodeBank') {
            $otherID=null;
            if(!empty($this->urlParams['OtherID']) && is_numeric($this->urlParams['OtherID'])) {
                $otherID=intval($this->urlParams['OtherID']);
            }
            
            return $this->LinkWithSearch(Controller::join_links($this->Link('show'), $this->currentPageID(), $otherID));
        }
        
        return $this->LinkWithSearch(singleton('CodeBank')->Link());
    }
560460
protected function parseLink()
    {
        if ($this->type != '[') {
            return $this;
        }
        
        $this->consume();
        $url = $this->consume('T_URL');
        $this->consume(']');
        
        return new AST\Link($url);
    }
1203742
protected function parseLink():self
	{
		return $this->setMultinameAttribute('link',$this->sectionLedBy('@',true),function( string$link ){
			if( isset($this->config['target']) && ':'===$link{0} ){
				return 'javascript'.$link;
			}elseif( '//'===($firstTwoLetters=substr($link,0,2)) ){
				return 'http:'.$link;
			}elseif( '\\\\'===$firstTwoLetters ){
				return 'https://'.substr($link,2);
			}else{
				return $this->checkExpression($link);
			}
		});
	}
103360
public function getAdminLinkAttribute()
    {
        if ($this->admin_id) {
            return sprintf('<a href="%s">%s</a>',
                $this->filterUrl(['admin_id' => $this->admin_id]),
                $this->admin->getAdminTitleHtmlAttribute());
        } else {
            return 'Someone';
        }
    }
1091088
public function Link()
    {
        $link = '';
        switch ($this->type) {
            case 'Internal' :
                if ($this->internal && ($page = SiteTree::get()->byID($this->internal))) {
                    $link = $page->Link();
                }
                break;
            case 'External' :
                $link = $this->external;
                break;
            case 'Email' :
                $link = $this->email ? 'mailto:' . $this->email : '';
                break;
            case 'File' :
                if ($this->file) {
                    $link = File::get()->byID($this->file)->Filename;
                }
                break;
            case 'DataObject':
                if ($do = $this->getDO()) {
                    $link = $do->Link();
                }
                break;
        }

        if ($this->extra) {
            //added a query string, but no ? to start it
            if (strpos($this->extra, '=' !== false && strpos($this->extra, '?' === false))) {
                $link .= '?';
            }

            $link .= $this->extra;
        }

        if ($this->anchor) {
            $link .= '#' . $this->anchor;
        }

        return $link;
    }
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;
    }
96904
public function viewLink()
    {
        $link   = null;
        $locale = $this->lang();
        if ($locale !== null) {
            $translator = $this->translator();
            $origLocale = $translator->getLocale();
            $translator->setLocale($this->lang());
            $link = $this->renderTemplate('{{# withBaseUrl }}{{ obj.url }}{{/ withBaseUrl }}');
            $translator->setLocale($origLocale);
        }

        return $link;
    }
609423
protected function render_telegram_link(): string
    {
        if (!$this->mobileDetector->isSmart()) {
            return '';
        }

        return '<a class="telegram-link social-link share-link" rel="external nofollow" href="tg://msg_url?url='.
            \urlencode_deep(\wp_get_shortlink($this->post->get()->ID)).
            '&text='.\urlencode_deep(\get_the_title($this->post->get())).
            '" itemprop="url"><i class="fab fa-telegram fa-sm" aria-hidden="true"></i> '.
            \esc_html__('Telegram', 'grotto-wp-posts').'</a>';
    }
1308315
private function getCanonicalLink(): ?string {
        $nodes = $this->getNodesByLowercasePropertyValue($this->article()->getDoc(), 'link', 'rel', 'canonical');

        if ($nodes->count()) {
            return trim($nodes->first()->attr('href'));
        }

        $nodes = $this->getNodesByLowercasePropertyValue($this->article()->getDoc(), 'meta', 'property', 'og:url');

        if ($nodes->count()) {
            return trim($nodes->first()->attr('content'));
        }

        $nodes = $this->getNodesByLowercasePropertyValue($this->article()->getDoc(), 'meta', 'name', 'twitter:url');

        if ($nodes->count()) {
            return trim($nodes->first()->attr('content'));
        }

        return $this->article()->getFinalUrl();
    }
138821
public function get_formatted_description() {
        if (!isset($this->definition->description)) {
            return '';
        }
        return format_text($this->definition->description, $this->definition->descriptionformat);
    }
873472
public function asText(): string
    {
        if ($this->keyword === self::KEYWORD_STILLBORN) {
            // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (stillborn)
            return I18N::translate('(stillborn)');
        }

        if ($this->keyword === self::KEYWORD_INFANT) {
            // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (in infancy)
            return I18N::translate('(in infancy)');
        }

        if ($this->keyword === self::KEYWORD_CHILD) {
            // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (in childhood)
            return I18N::translate('(in childhood)');
        }

        $age = [];

        // Show a zero age as "0 years", not "0 days"
        if ($this->years > 0 || $this->months === 0 && $this->weeks === 0 && $this->days === 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s year', '%s years', $this->years, I18N::number($this->years));
        }

        if ($this->months > 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s month', '%s months', $this->months, I18N::number($this->months));
        }

        if ($this->weeks > 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s week', '%s weeks', $this->weeks, I18N::number($this->weeks));
        }

        if ($this->days > 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s day', '%s days', $this->days, I18N::number($this->days));
        }

        // If an age is just a number of years, only show the number
        if ($this->years > 0 && $this->months === 0 && $this->weeks === 0 && $this->days === 0) {
            $age = [I18N::number($this->years)];
        }

        $age_string = implode(I18N::$list_separator, $age);

        if ($this->qualifier === self::SYMBOL_LESS_THAN) {
            // I18N: Description of an individual’s age at an event. For example, Died 14 Jan 1900 (aged less than 21 years)
            return I18N::translate('(aged less than %s)', $age_string);
        }

        if ($this->qualifier === self::SYMBOL_MORE_THAN) {
            // I18N: Description of an individual’s age at an event. For example, Died 14 Jan 1900 (aged more than 21 years)
            return I18N::translate('(aged more than %s)', $age_string);
        }

        // I18N: Description of an individual’s age at an event. For example, Died 14 Jan 1900 (aged 43 years)
        return I18N::translate('(aged %s)', $age_string);
    }
1202020
public function linkTitle()
    {
        return $this->entity->param('link_title') ? $this->entity->param('link_title') : $this->entity->title;
    }
517480
public function getResultUrl($linked = false)
    {
        $linkText = $this->cObj->typoLink_URL($this->getResultLinkConfiguration());
        $linkText = htmlspecialchars($linkText);
        if ($linked) {
            return $this->cObj->typoLink($linkText, $this->getResultLinkConfiguration());
        }
        return $linkText;
    }