Slide 62
Slide 62 text
public function getSingleMetaForChannel(string $path): SeoMeta
{
$options = [
'lang' => self::MAP_CHANNEL_LOCALE[$this->channel],
'orderings' => '[document.last_publication_date desc]',
];
$document = $this->client->findOneByPath(
'seo__content',
$path,
$options
);
if (null === $document) {
throw new NotFoundException("Meta for path {$path} not found");
}
return new SeoMeta($document);
}
PrismicSeoRepository.php