/** * @param SeoAwareInterface $content * @param ItemInterface $itemInterface */ public function updateMetadata($content, ItemInterface $itemInterface) { $seoMetaData = $content->getSeoMetadata(); $itemInterface->setTitle($seoMetaData->getTitle()); $itemInterface->setDescription($seoMetaData->getMetaDescription()); $itemInterface->setLink($seoMetaData->getOriginalUrl()); }
/** * @param SeoAwareInterface $content * @param ChannelInterface $channel */ public function updateMetadata($content, ChannelInterface $channel) { $seoMetaData = $content->getSeoMetadata(); $channel->setTitle($seoMetaData->getTitle()); $channel->setDescription($seoMetaData->getMetaDescription()); $channel->setLink($seoMetaData->getOriginalUrl()); }
/** * The seo metadata that was edited embedded has the same locale as the * containing document. * * @param SeoAwareInterface $seoAware */ private function propagateLocale(SeoAwareInterface $seoAware) { if (!$seoAware instanceof TranslatableInterface) { return; } $seoMetadata = $seoAware->getSeoMetadata(); if (!$seoMetadata instanceof TranslatableInterface) { return; } $seoMetadata->setLocale($seoAware->getLocale()); }