Webiny\Component\Bootstrap\ApplicationClasses\View::setTitle PHP Method

setTitle() public method

Set the page title.
public setTitle ( string $title )
$title string Page title.
    public function setTitle($title)
    {
        $this->title = $title;
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: ViewTest.php プロジェクト: Webiny/Framework
 public function testSetGetTitle()
 {
     $view = new View();
     $view->setTitle('Test Title');
     $this->assertSame('Test Title', $view->getTitle());
     $this->assertSame('<title>Test Title</title>', $view->getTitleHtml());
 }