throw new DecorationPatternException(self::
class);
} /**
* @return ResolvedSeoUrl
*/
public function resolve(string
$languageId, string
$salesChannelId, string
$pathInfo): array
{ $seoPathInfo =
ltrim($pathInfo, '/'
);
$query =
(new QueryBuilder($this->connection
)) ->
select('id', 'path_info pathInfo', 'is_canonical isCanonical', 'sales_channel_id salesChannelId'
) ->
from('seo_url'
) ->
where('language_id = :language_id'
) ->
andWhere('(sales_channel_id = :sales_channel_id OR sales_channel_id IS NULL)'
) ->
andWhere('seo_path_info = :seoPath'
) ->
setParameter('language_id', Uuid::
fromHexToBytes($languageId)) ->
setParameter('sales_channel_id', Uuid::
fromHexToBytes($salesChannelId)) ->
setParameter('seoPath',
$seoPathInfo);
$query->
setTitle('seo-url::resolve'
);