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

getMeta() public method

Get the meta list.
public getMeta ( ) : array
return array
    public function getMeta()
    {
        return $this->meta;
    }

Usage Example

Example #1
0
 public function testMeta()
 {
     $view = new View();
     $view->setMeta('keyword', 'testing');
     $view->setMeta('description', 'Just testing');
     $expectedArray = ['keyword' => 'testing', 'description' => 'Just testing'];
     $this->assertSame($expectedArray, $view->getMeta());
     $html = '';
     foreach ($expectedArray as $name => $content) {
         $html .= '<meta name="' . $name . '" content="' . $content . '"/>' . "\n";
     }
     $this->assertSame($html, $view->getMetaHtml());
 }