Setter method for the menu title.

@param string $title The menu item title.
@return \luya\cms\menu\InjectItem
171634
public function setTitle($title)
    {
        // if the alias is empty use the title for the alias.
        if ($this->_alias === null) {
            $this->setAlias($title);
        }
        
        $this->_title = $title;
        
        return $this;
    }
1156315
public function setTitle($title)
    {
        $title = trim($title);
        $title = language($title);
        $this->store('title', $title);
        presenter()->meta->title->append($title);

        return $this;
    }
774249
public function setTitle(?string $title, bool $includePageName = false) {
		if ($title === null) {
			return $this;
		}
		
		$this->htmlProperties->set(self::HEAD_TITLE_KEY, new HtmlElement('title', null, $title
				. ($includePageName ?  ' - ' . $this->getPageName() : '')));
		
		return $this;
	}
351508
protected function _setTitleAttr($title, array $options = [])
    {
        if (!Arr::key('title', $options)) {
            $options['title'] = strip_tags($title);
        }

        return $options;
    }
461472
protected function setTitle($title)
    {
        if (0 === strlen(trim($title))) {
            throw new \InvalidArgumentException('Provided title cannot be empty');
        }

        $this->title = (string) $title;
    }
175543
public function setTitle(Title $title)
    {
        $this->attachment['title'] = $title;

        if ($title->hasLink()) {
            $this->attachment['title_link'] = $title->getLink();
        }

        return $this;
    }
332151
public function setTitle($title = null)
        {
            if (null !== $title && !is_string($title)) {
                throw new Exception(
                        'Invalid argument: $title must be a non-empty string');
            }

            $this->_title = $title;

            return $this;
        }
826538
public function setPageName($title)
    {
        $this->oldTitle = $this->pageName;
        $this->pageName = $title;

        if ($this->pageName && $this->getContentRoute()) {
            $this->getContentRoute()->setName($this->pageName);
        }

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

        return $item;
    }
1218956
public function setTitle( $title ) {
		if ( $this->title !== $title ) {
			$this->title = $title;
			$this->updateTitle();
		}

		return $this;
	}
528976
private function addTitle($title)
    {
        $this->seoPage->addTitle($title);
        $this->seoPage->addMeta('name', 'title', $title);
    }
1315548
public function setRootTitle( $title )
    {
        $content = $this->getDependentContent();

        if ( $content )
        {
            $content->title = $title;
        }

        return $this;
    }
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));
    }
74239
public function setBodyTitle($title)
    {
        $this->getResponse()->getTheme()->setBodyTitle($title);
        $this->_title = $title;
    }
1014618
public function setSingular($title = [])
    {
        if (! empty($title) && isset($title[0])) {
            $this->singular = $title[0];
        } else {
            $name = str_replace('_', ' ', $this->getSlug());

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

        return $this;
    }
214599
public function setTitle($title, array $attributes)
    {
        if (! isset($attributes['title'])) {
            $attributes['title'] = $this->getQualifiedTitle($title);
        }

        return $attributes;
    }
836585
public function rename($title)
    {
        if ($this->title !== $title) {
            $oldTitle = $this->title;
            $this->title = $title;

            $this->raise(new Renamed($this, $oldTitle));
        }

        return $this;
    }