/**
  * @return string
  */
 public function getHeadAttributes()
 {
     $attributes = '';
     foreach ($this->page->getHeadAttributes() as $name => $value) {
         $attributes .= sprintf('%s="%s" ', $name, $value);
     }
     return rtrim($attributes);
 }
Example #2
0
    /**
     * @param SeoPageInterface $seoPage
     *
     * @return void
     */
    protected function registerHeaders(SeoPageInterface $seoPage)
    {
        $attributeName = 'prefix';
        $headAttributes = $seoPage->getHeadAttributes();
        if (!isset($headAttributes[$attributeName])) {
            $headAttributes[$attributeName] = '';
        }
        $headAttributes[$attributeName] .= 'og: http://ogp.me/ns#
fb: http://ogp.me/ns/fb#
product: http://ogp.me/ns/product#';
        $seoPage->setHeadAttributes($headAttributes);
    }