Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setSeoPathInfo example
$pathInfo
=
$this
->router->
generate
(
$config
->
getRouteName
(
)
,
$mapping
->
getInfoPathContext
(
)
)
;
$pathInfo
=
$this
->
removePrefix
(
$pathInfo
,
$basePath
)
;
$copy
->
setPathInfo
(
$pathInfo
)
;
$seoPathInfo
=
$this
->
getSeoPathInfo
(
$mapping
,
$config
)
;
if
(
$seoPathInfo
=== null ||
$seoPathInfo
=== ''
)
{
continue
;
}
$copy
->
setSeoPathInfo
(
$seoPathInfo
)
;
$copy
->
setSalesChannelId
(
$salesChannel
->
getId
(
)
)
;
yield
$copy
;
}
}
private
function
getSeoPathInfo
(
SeoUrlMapping
$mapping
, SeoUrlRouteConfig
$config
)
: ?string
{
try
{
return
trim
(
$this
->twig->
render
(
'template',
$mapping
->
getSeoPathInfoContext
(
)
)
)
;
}
catch
(
\Throwable
$error
)
{