Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function updateSeoPage(SeoMetadataInterface $seoMetadata)
 {
     $site = $this->siteManager->find();
     if (null !== $site && null !== ($siteSeoMetadata = $site->getSeoMetadataByLang($seoMetadata->getLang()))) {
         $this->seoPage->setTitle($siteSeoMetadata->getTitle());
     }
     parent::updateSeoPage($seoMetadata);
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function updateSeoPage(SeoMetadataInterface $seoMetadata)
 {
     $this->seoPage->addHtmlAttributes('lang', $seoMetadata->getLang());
     $this->seoPage->addMeta('charset', $this->encoding, '');
     if ($description = $seoMetadata->getMetaDescription()) {
         $this->seoPage->addMeta('name', 'description', $description);
     }
     if ($extraHttp = $seoMetadata->getExtraHttp()) {
         $this->addMetas('http-equiv', $extraHttp);
     }
     if ($extraNames = $seoMetadata->getExtraNames()) {
         $this->addMetas('name', $extraNames);
     }
     if ($extraProperties = $seoMetadata->getExtraProperties()) {
         $this->addMetas('property', $extraProperties);
     }
     if ($keywords = $seoMetadata->getMetaKeywords()) {
         $this->seoPage->addMeta('name', 'keywords', $keywords);
     }
     if ($robots = $seoMetadata->getMetaRobots()) {
         $this->seoPage->addMeta('name', 'robots', $robots);
     }
     if ($title = $seoMetadata->getTitle()) {
         $this->addTitle($title);
     }
 }