Adds a title tag

@param  string $title
@return OpenGraph
340971
public function title(string $title) : self
    {
        $title = trim($title);

        if ($this->validate and ! $title) {
            throw new Exception("Open Graph: Invalid title (empty)");
        }

        $this->forget('title');

        $this->tags[] = $this->createTag('title', strip_tags($title));

        return $this;
    }
466678
public function setTitle($title)
    {
        // Check if title already exists
        $headTitle = $this->selectElement('title')->item(0);
        if (!is_null($headTitle)) {
            $headTitle_new = $this->create('title', $title);
            $headTitle->parentNode->replaceChild($headTitle_new, $headTitle);
        } else {
            $headTitle = $this->create('title', $title);
            $this->appendToHead($headTitle);
        }

        return $this;
    }
82731
public function prepend($title, $url, array $options = array()) {
        array_unshift($this->_crumbs, array(
            'title' => strip_tags($title),
            'url' => $url,
            'options' => $options
        ));

        $this->OpenGraph->title($this->pageTitle(null, array('reverse' => true)));
        $this->OpenGraph->uri($url);

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

        return $title;
    }
1185597
public function addGroupTextAction($title)
	{
		$id = ($s = sizeof($this->group_actions)) ? ($s + 1) : 1;

		return $this->group_actions[$id] = new GroupTextAction($title);
	}
930834
public function setTitle($title, $link = null)
    {
        $this->data['title'] = $title;
        if ($link) {
            $this->data['title_link'] = $link;
        }

        return $this;
    }
527676
private function cleanTitle(string $title): string {
        $openGraph = $this->article()->getOpenGraph();

        // Check if we have the site name in OpenGraph data and it does not match the title
        if (isset($openGraph['site_name']) && $openGraph['site_name'] != $title) {
            $title = str_replace($openGraph['site_name'], '', $title);
        }

        // Try to remove the domain from URL
        if ($this->article()->getDomain()) {
            $title = str_ireplace($this->article()->getDomain(), '', $title);
        }

        // Split the title in words
        // TechCrunch | my wonderfull article
        // my wonderfull article | TechCrunch
        $titleWords = preg_split('@[\s]+@', trim($title));

        // Check for an empty title
        if (empty($titleWords)) {
            return '';
        }

        // Check if last letter is in self::$SPLITTER_CHARS
        // if so remove it
        if (in_array($titleWords[count($titleWords) - 1], self::$SPLITTER_CHARS)) {
            array_pop($titleWords);
        }

        // Check if first letter is in self::$SPLITTER_CHARS
        // if so remove it
        if (isset($titleWords[0]) && in_array($titleWords[0], self::$SPLITTER_CHARS)) {
            array_shift($titleWords);
        }

        // Rebuild the title
        $title = trim(implode(' ', $titleWords));

        return $title;
    }
309441
public function createTitle($title)
    {
        $item = $this->list->createList($title);
        $item->attributes->addAttributeClass('menu-title');

        return $item;
    }
563332
public function addCollection($title)
    {
        $collections = $this->getCollections();

        /** @var Collection $collection */
        $collection = $this->getExtensions()->createElement($this, 'app:collection');
        $collection->addTitle($title);

        $collections[] = $collection;
        $this->setCachedProperty('collections', $collections);

        return $collection;
    }
1010076
public function setPlural($title = [])
    {
        if (! empty($title) && isset($title[1])) {
            $this->plural = $title[1];
        } else {
            $name = str_replace('_', ' ', $this->getSlug());

            $this->plural = Str::plural(Str::title($name));
        }

        return $this;
    }
1304638
public function setTitle(string $title) : CNabuDataObject
    {
        if ($title === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$title")
            );
        }
        $this->setValue('nb_user_group_lang_title', $title);
        
        return $this;
    }
411530
public function setTitle($title)
    {
        if (!empty($title)) {
            Yii::$app->view->registerMetaTag(['name' => 'title', 'content' => $title], 'title');
            Yii::$app->view->registerMetaTag(['name' => 'og:title', 'content' => $title], 'og:title');
            Yii::$app->view->title = $title;
        }
        return $this;
    }
1246815
public function setTitle($title, $siteName = null, $separator = null)
    {
        $this->meta()->setTitle($title, null, $separator);
        $this->openGraph()->setTitle($title);
        $this->twitter()->setTitle($title);

        return $this->setSiteName($siteName);
    }
695893
public function setTitle(string $title): self
    {
        if (strlen($title) > 31) {
            $title = mb_substr($title, 0, 31);
        }

        $this->title = $title;

        return $this;
    }
832016
public static function create(string $title = null, string $subtitle = null): self
    {
        $metadata = new self();

        $metadata->title    = $title;
        $metadata->subtitle = $subtitle;

        return $metadata;
    }
358240
public function addSeparator($title=NULL) {
	
		$item 			= new \stdClass();
		$item->type		= 'separator';
		$item->title	= $title;
		$this->items[]	= $item;
	
	}
416251
public function title(string $title = null): Htmlable
    {
        $page = Paginator::resolveCurrentPage();

        $data = [
            'site' => ['name' => $this->site],
            'page' => ['title' => $title, 'number' => $page],
        ];

        $data['site']['name'] = $this->getHtmlTitleFormatForSite($data);

        $output = $this->getHtmlTitleFormatForPage($data);

        return $this->html->create('title', trim($output));
    }