sfWebResponse::prependTitle PHP Method

prependTitle() public method

Preprend title
public prependTitle ( string $title, string $separator = ' - ', boolean $escape = true )
$title string Title name
$separator string Separator string (default: " - ")
$escape boolean true, for escaping the title
    public function prependTitle($title, $separator = ' - ', $escape = true)
    {
        if (!isset($this->metas['title'])) {
            $this->setTitle($title);
            return;
        }
        // FIXME: If you use the i18n layer and escape the data here, it won't work
        // see include_metas() in AssetHelper
        if ($escape) {
            $title = htmlspecialchars($title, ENT_QUOTES, $this->options['charset']);
        }
        $this->metas['title'] = $title . $separator . $this->metas['title'];
    }