Return the title, description, keywords and language metatags.
NOTE: Shamelessley taken from SiteTree

@param bool $includeTitle Show default <title>-tag, set to false for custom templating

@return string The XHTML metatags
342146
public function MetaTags($includeTitle = true)
    {
        $tags = [];
        $owner = $this->getOwner();

        if ($includeTitle && strtolower($includeTitle) != 'false') {
            $tags[] = HTML::createTag(
                'title',
                [],
                $owner->obj('Title')->forTemplate()
            );
        }

        $generator = trim(Config::inst()->get(self::class, 'meta_generator'));
        if (!empty($generator)) {
            $tags[] = HTML::createTag('meta', array(
                'name' => 'generator',
                'content' => $generator,
            ));
        }

        $charset = ContentNegotiator::config()->uninherited('encoding');
        $tags[] = HTML::createTag('meta', array(
            'http-equiv' => 'Content-Type',
            'content' => 'text/html; charset=' . $charset,
        ));
        if ($owner->MetaDescription) {
            $tags[] = HTML::createTag('meta', array(
                'name' => 'description',
                'content' => $owner->MetaDescription,
            ));
        }

        if (Permission::check('CMS_ACCESS_CMSMain') && $owner->exists()) {
            $tags[] = HTML::createTag(
                'meta',
                [
                    'name' => 'x-page-id',
                    'content' => $owner->obj('ID')->forTemplate()
                ]
            );
            $tags[] = HTML::createTag(
                'meta',
                [
                    'name' => 'x-cms-edit-link',
                    'content' => $owner->obj('CMSEditLink')->forTemplate()
                ]
            );
        }

        $tags = implode("\n", $tags);
        if ($owner->ExtraMeta) {
            $tags .= $owner->obj('ExtraMeta')->forTemplate();
        }

        $owner->extend('updateMetaTags', $tags);

        return $tags;
    }
909879
protected function getQuestionHeader($includeDefault = true)
    {
        $header = '';
        if ($this->isRequired()) {
            $header .= $this->requiredMarker;
        }
        $header .= '<fg=green>' . $this->name . '</> (--' . $this->getOptionName() . ')';
        if ($this->questionLine === null && !empty($this->description)) {
            $header .= "\n" . $this->description;
        } elseif (!empty($this->questionLine)) {
            $header .= "\n" . $this->questionLine;
        }
        if ($includeDefault && $this->default !== null) {
            $header .= "\n" . 'Default: <question>' . $this->formatDefault($this->default) . '</question>';
        }

        return $header;
    }
779133
public function _htmlHeader($title)
    {

        $output = $this->_doctype();
        $output .= '<html lang="en">'."\n";
        $output .= "<head>\n\n";

        $output .= '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'."\n\n";
        $output .= '<meta name="generator" content="PHPDoctor '.$this->_doclet->version().' (http://peej.github.com/phpdoctor/)">'."\n";
        $output .= '<meta name="when" content="'.gmdate('r').'">'."\n\n";

        $output .= '<link rel="stylesheet" type="text/css" href="'.str_repeat('../', $this->_depth).'stylesheet.css">'."\n";
        $output .= '<link rel="start" href="'.str_repeat('../', $this->_depth).'namespaces.html">'."\n\n";

        $output .= '<title>';
        if ($title) {
            $output .= $title.' ('.$this->_doclet->windowTitle().')';
        } else {
            $output .= $this->_doclet->windowTitle();
        }
        $output .= "</title>\n\n";
        $output .= "</head>\n";

        return $output;

    }
1164033
public static function titleContains($title)
    {
        return new static(
            function (WebDriver $driver) use ($title) {
                return mb_strpos($driver->getTitle(), $title) !== false;
            }
        );
    }
932317
public function setTitle($title, $appendDefault = true)
    {
        $this->metatags()->setTitle($title, $appendDefault);
        $this->opengraph()->setTitle($title);
        $this->twitter()->setTitle($title);
        $this->jsonLd()->setTitle($title);

        return $this;
    }
1026770
public function getTitleText()
    {
        if ($this->UseSourceTitle && $this->hasSourceComponent()) {
            return $this->SourceComponent()->getTitleText();
        }
        
        return parent::getTitleText();
    }
342629
public function getTitle()
    {
        if ($this->_sTitle === null || $this->getLanguageId() != \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage()) {
            $oArticle = $this->getArticle();
            $this->_sTitle = $oArticle->oxarticles__oxtitle->value;

            if ($oArticle->oxarticles__oxvarselect->value) {
                $this->_sTitle = $this->_sTitle . ', ' . $this->getVarSelect();
            }
        }

        return $this->_sTitle;
    }
760353
protected function getTitleTag()
    {
        $legend_tag = new SwatHtmlTag('legend');
        $legend_tag->setContent($this->title, $this->title_content_type);

        return $legend_tag;
    }
1363249
public function MetaTitle()
    {
        $mapping = self::$url_handlers;
        if ($action = $this->getRequest()->param('Action')) {
            switch ($mapping[$action]) {
                case 'show' :
                    $news = $this->getNews();
                    if (isset($news)) {
                        $this->Title = $news->Title . ' - ' . $this->Title;
                    }
                    break;
                case 'tag' :
                    $tags = $this->getTag();
                    if (isset($tags)) {
                        $this->Title = $tags->Title . ' - ' . $this->Title;
                    }
                    break;
                case 'tags' :
                    $this->Title = _t('News.ALLTAGS_PAGE', 'All tags - ') . $this->Title;
                    break;
                case 'author' :
                    $this->Title = _t('News.AUTHOR_PAGE', 'Items by ') . ucfirst($this->getRequest()->param('ID')) . ' - ' . $this->Title;
                    break;
                case 'archive' :
                    $this->Title = _t('News.ARCHIVE_PAGE', 'Items per period ') . $this->Title;
                    break;
            }

            return $this->Title;
        }
    }
794201
public static function filterTitle(string $title): string
    {
        $title = html_entity_decode($title);
        $title = static::filterPunctuation($title);
        $title = preg_replace('#[^=\x20-\x3B\x3F-\x7E\xA0\x{400}-\x{45F}]+#u', ' ', $title);
        $title = preg_replace('# {2,}#', ' ', $title);

        return trim($title);
    }
23716
public function getNodeTranslations($includeOffline = false)
    {
        return $this->nodeTranslations
            ->filter(function (NodeTranslation $entry) use ($includeOffline) {
                if ($includeOffline || $entry->isOnline()) {
                    return true;
                }

                return false;
            }
            );
    }
909015
public function renderMeta($title)
    {
        $this->setGlobalVariables();

        return $this->meta()
            ->setTitle($this->makeTitle($title))
            ->addMeta(['charset' => 'utf-8'], 'meta::charset')
            ->addMeta(['content' => csrf_token(), 'name' => 'csrf-token'])
            ->addMeta(['content' => 'width=device-width, initial-scale=1', 'name' => 'viewport'])
            ->addMeta(['content' => 'IE=edge', 'http-equiv' => 'X-UA-Compatible'])
            ->render();
    }
905093
public function getTitle($allowBasicTags = false)
    {
        $titleParts = [];

        if ($allowBasicTags === true) {
            $allowedTags = '<b><del><em><i><strong><s>';
        } else {
            $allowedTags = '';
        }

        foreach ($this->getTitleColumnName() as $fieldName) {
            // Make sure we add strings only, as some fields may be an array or DateTime.
            $value = is_array($this->values[$fieldName]) ? implode(' ', $this->values[$fieldName]) : (string) $this->values[$fieldName];
            if (strip_tags($value, $allowedTags) !== '') {
                $titleParts[] = strip_tags($value, $allowedTags);
            }
        }

        if (!empty($titleParts)) {
            $title = implode(' ', $titleParts);
        } else {
            // nope, no title was found.
            $title = '';
        }

        return $title;
    }
455679
public static function getRssTitle($title = '')
    {
        $title = esc_html(trim(strip_tags($title)));
        $title = (empty($title)) ? __('Untitled', 'modularity') : $title;

        return $title;
    }
275870
protected function getTitle()
	{
		// Initialise variables.
		$title = '';

		if ($this->hidden)
		{

			return $title;
		}

		// Get the label text from the XML element, defaulting to the element name.
		$title = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
		$title = $this->translateLabel ? Lang::txt($title) : $title;

		return $title;
	}
1038860
public function menuItemLabel($title = null) {
		$result = '';
		if (empty($title)) {
			return $result;
		}

		$result = $this->Html->tag('span', $title, ['class' => 'menu-item-label visible-xs-inline']);

		return $result;
	}
271205
private function getTypeFromTitle($title)
    {
        $title_types = array(
            'stylesheet'    => 'UserStylesheet',
            'script'        => 'UserScript',
            'title'         => 'StoryTitle',
        );

        foreach ($title_types as $type => $name) {
            if ($title == $name) {
                return $type;
            }
        }

        // Let's assume if the title isn't on the list, the entity is a passage
        return 'passage';
    }