Set page title and metadata using the config (see site.metadata config).

@param string $title The document title.
@param array $data The metadata array.
@param bool $merge Merge with current tags.
501908
public static function setMetadata($title=null, $data=[], $merge=true)
    {
        if (self::$_page) {
            // format the title
            $simple_title = $title;
            if ($title) {
                $title = str_replace('{}', $title, Config::get('site.title-format', '{}'));
            } else {
                $simple_title = $title = Config::get('site.title', '');
            }
            self::$_page->title($title);
            // merge data with the global configuration
            if ($merge) {
                if ($config_data = Config::get('site.metadata', [])) {
                    $data = array_merge($config_data, $data);
                }
            }
            // set basic meta tags
            foreach (['description', 'keywords', 'author'] as $name) {
                if (!empty($data[$name])) {
                    self::$_page->metaTag($name, $data[$name]);
                }
            }
            // set tags for Twitter Cards
            if (isset($data['twitter']) && is_array($data['twitter'])) {
                self::$_page->ogTags($data['twitter'], false, 'twitter');
            } else {
                self::$_page->ogTags([], false, 'twitter');
            }
            // set Open Graph tags
            if (isset($data['og']) && is_array($data['og'])) {
                $og_tags = [
                    'title' => $simple_title,
                    'url' => Asbestos::request()->getUrl()
                ];
                if (!empty($data['description'])) {
                    $og_tags['description'] = $data['description'];
                }
                self::$_page->ogTags(array_merge($og_tags, $data['og']), false);
            } else {
                self::$_page->ogTags([], false);
            }
        }
    }
656338
protected function setTitleAttribute($title)
    {
        $this->attributes['title'] = $title;
        $this->slug = Str::slug($title);
    }
505287
public function setTitle($title) {
		if (is_array($title) && empty($title)) {
			$this->title = new \stdClass;
		} else {
			$this->title = $title;
		}

		return $this;
	}
1185500
private function setStyle($media, $style, $title)
    {
        $this->assets[$this->tag[$this->where]][strtolower(__FUNCTION__)][] = (string)
            static::$stylesheet.' '.$media.'
                    '.$title.' href="'.$this->getBaseUrl().$style.'" >'.PHP_EOL;
    }
63644
public function updateTreeTitle(&$title)
    {
        if ($this->owner->AccessAllSubsites) {
            $title = _t(__CLASS__ . '.GlobalGroup', 'global group');
            $title = htmlspecialchars($this->owner->Title, ENT_QUOTES) . ' <i>(' . $title . ')</i>';
        } else {
            $subsites = Convert::raw2xml(implode(', ', $this->owner->Subsites()->column('Title')));
            $title = htmlspecialchars($this->owner->Title) . " <i>($subsites)</i>";
        }
    }
743084
public function setTitle($title, $appendDefault = true)
    {
        // clean title
        $title = strip_tags($title);

        // store title session
        $this->title_session = $title;

        // store title
        if (true === $appendDefault) {
            $this->title = $this->parseTitle($title);
        } else {
            $this->title = $title;
        }

        return $this;
    }
1134556
public function setTitle($title, $subtitle = null)
    {
        $this->title = $title;
        $this->subtitle = $subtitle;
    }
154175
public function merge($data)
	{
		foreach ($data as $key => $value) {
			$this->set($key, $value);
		}
	}
1058826
public function setTitle($title, $function = '')
    {
        $this->completeTitle = $title;
        
        if ($function != '') {
            $this->completeTitle .= ' - ' . $function;
            $this->menuManager->setBreadcrumbFunction($function);
        }
        
        $this->metaInformationManager->setTitle($this->completeTitle);
    }
801326
public void setTitle(java.lang.String title) {
        getStateHelper().put(PropertyKeys.title, title);
        handleAttribute("title", title);
    }
1054572
function set_title($title) {
        global $PAGE;

        $this->page = null;
        $this->title = $title;
        // set_title calls format_string itself so no probs there
        $PAGE->set_title($this->title);
    }
1337548
protected function setMetaEntity(array $data)
    {
        if (!empty($data['meta_title'])) {
            $this->setTitle($data['meta_title'], false);
        }

        if (!empty($data['meta_description'])) {
            $this->setMeta(array('name' => 'description', 'content' => $data['meta_description']));
        }

        $this->setMeta(array('rel' => 'canonical', 'href' => $this->path));
    }
908841
public function toRender($title, $crud, $data)
    {
        $view       = $this->di->get("view");
        $pageRender = $this->di->get("pageRender");
        $view->add($crud, $data);
        $tempfix = "";
        $pageRender->renderPage($tempfix, ["title" => $title]);
    }
207700
public function setBind($bind, $merge = true)
    {
        $this->_bind = $merge ? array_merge($this->_bind, $bind) : $bind;

        return $this;
    }
207900
public function setFeatureData($feature, array $data)
    {
        $feature = $this->get($feature);
        if ($feature) {
            $feature->setData(array_merge($feature->getData(), $data));
            $this->save($feature);
        }
    }
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;
	}
1342919
public function setTitle($title)
    {
        $returnValue = (bool) false;

        
		$this->title = $title;
		$returnValue = true;
        

        return (bool) $returnValue;
    }