Prepare the page title from the first h1 found.

@return $this
349374
protected function prepareTitle()
    {
        $this->title = (new Crawler($this->content))->filterXPath('//h1');
        $this->title = count($this->title) ? $this->title->text() : null;

        return $this;
    }
990483
public function getTitle() : ?string 
    {
        if ( ! $this->hasTitle()) {
            $this->setTitle($this->getDefaultTitle());
        }
        return $this->title;
    }
860406
public function title()
    {
        return $this->translator()->has($key = $this->translationKey())
            ? trans($key)
            : StringHumanizer::humanize(class_basename($this));
    }
818943
public function setTitle($title, $siteName = null, $separator = null)
    {
        return $this->seo()->setTitle($title, $siteName, $separator);
    }
319264
protected function updateTitle() {
		$title = $this->getTitle();
		if ( $title !== null ) {
			// Only if this is an AccessKeyedElement
			if ( method_exists( $this, 'formatTitleWithAccessKey' ) ) {
				$title = $this->formatTitleWithAccessKey( $title );
			}
			$this->titled->setAttributes( [ 'title' => $title ] );
		} else {
			$this->titled->removeAttributes( [ 'title' ] );
		}
		return $this;
	}
1105461
protected function getTitleForLayout()
    {
        if (!empty($this->titleForLayout)) {
            return $this->titleForLayout;
        }

        //Gets the main title setted by the configuration
        $title = getConfigOrFail('main.title');

        //For homepage, it returns only the main title
        if ($this->request->isUrl(['_name' => 'homepage'])) {
            return $title;
        }

        //If exists, it adds the title setted by the controller, as if it has
        //  been set via `$this->View->set()`
        if ($this->get('title')) {
            $title = sprintf('%s - %s', $this->get('title'), $title);
        //Else, if exists, it adds the title setted by the current view, as if
        //  it has been set via `$this->View->Blocks->set()`
        } elseif ($this->fetch('title')) {
            $title = sprintf('%s - %s', $this->fetch('title'), $title);
        }

        return $this->titleForLayout = $title;
    }
923034
public function getPageTitle()
    {
        $titleParts = [];
        $titleParts[] = $this->getTitlePrefix();
        $titleParts[] = $this->getTitle();
        $titleParts[] = $this->getTitleSuffix();
        $titleParts[] = $this->getTitlePageSuffix();

        $titleParts = array_filter($titleParts);

        return implode(' | ', $titleParts);
    }
1121529
public function initHeadScript()
    {
        $javascripts = $this->orderByPriority($this->options->getJs()->getHead());
        foreach ($javascripts as $js) {
            $this->setJavascript($this->headScript, $js);
        }

        return $this;
    }
1110026
public function setTitle($value)
    {
        if ($value != null) {
            $this->_params['title'] = $value;
        } else {
            unset($this->_params['title']);
        }
        return $this;
    }
900793
public function setTitle($title)
    {
        $this->title = $title;
        $this->normalizedTitle = UrlUtil::normalize($title);
        return $this;
    }
327272
public function getTitle()
    {
        if (empty($this->title)) {
            $this->title = $this->_xml->children('h', true)->head->children('h', true)->title;
        }

        return $this->title;
    }
159038
public function title()
    {
        if (isset($this->title)) {
            return $this->title;
        }

        try {
            $config = $this->dashboardConfig();

            if (isset($config['title'])) {
                $this->title = $this->translator()->translation($config['title']);

                return $this->title;
            }
        } catch (Exception $e) {
            $this->logger->error($e->getMessage());
        }

        $obj = $this->obj();
        $metadata = $obj->metadata();
        $objLabel = null;

        if (!$objLabel && isset($metadata['admin']['forms'])) {
            $adminMetadata = $metadata['admin'];

            $formIdent = filter_input(INPUT_GET, 'form_ident', FILTER_SANITIZE_STRING);
            if (!$formIdent) {
                $formIdent = (isset($adminMetadata['default_form']) ? $adminMetadata['default_form'] : '');
            }

            if (isset($adminMetadata['forms'][$formIdent]['label'])) {
                $objLabel = $this->translator()->translation($adminMetadata['forms'][$formIdent]['label']);
            }
        }

        if (!$objLabel) {
            $objType = (isset($metadata['labels']['singular_name']) ?
                $this->translator()->translation($metadata['labels']['singular_name']) : null);

            $objLabel = $this->translator()->translation('Documentation: {{ objType }}');

            if ($objType) {
                $objLabel = strtr($objLabel, [
                    '{{ objType }}' => $objType
                ]);
            }
        }

        if ($obj->view()) {
            $this->title = $obj->render((string)$objLabel, $obj);
        } else {
            $this->title = (string)$objLabel;
        }

        return $this->title;
    }
305940
public Page title(String title)
    {
        properties.put(Title,title);
        String heading = (String)properties.get(Heading);
        if (heading==null||heading.equals(NoTitle))
            properties.put(Heading,title);
        return this;
    }
1134421
public function lastPage()
    {
        $last = Html::a($this->text['last'], $this->getUrl($this->pageTotal), ['title' => $this->text['last']]);

        $this->html['last'] = $this->hasListElement($last);

        return $this;
    }
381147
public function nextPage()
    {
        if ($this->options['page'] < $this->pageTotal) {
            $next = Html::a($this->text['next'], $this->getUrl($this->nextPage));
            $next = $this->hasListElement($next);
        }

        $this->html['next'] = isset($next) ? $next : '';

        return $this;
    }
304865
public function setTitle($title)
    {
        $this->setAutoDiscoverTitle($title === null);
        $this->title = $title;

        return $this;
    }
980665
public function prePersist()
    {
        $this->createdAt = $this->updatedAt = new \DateTime('now');

        if (!$this->metaTitle) {
            $this->setMetaTitle($this->pageName);
        }
    }