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

getTitleHtml() public method

Get the current page title as html tag.
public getTitleHtml ( ) : string
return string
    public function getTitleHtml()
    {
        return '<title>' . $this->title . '</title>';
    }

Usage Example

Example #1
0
 public function testSetGetTitle()
 {
     $view = new View();
     $view->setTitle('Test Title');
     $this->assertSame('Test Title', $view->getTitle());
     $this->assertSame('<title>Test Title</title>', $view->getTitleHtml());
 }