You are a developer and looking for Shopware projects?
Apply Now!
filterUrl example
$hrefs
=
[
]
;
foreach
(
$shops
as
$languageShop
)
{
$shop
=
$this
->
getDetachedShop
(
$languageShop
[
'id'
]
)
;
$config
->
setShop
(
$shop
)
;
$href
=
new
HrefLang
(
)
;
$href
->
setShopId
(
$languageShop
[
'id'
]
)
;
$href
->
setLocale
(
$languageShop
[
'locale'
]
)
;
$routingContext
=
$this
->
getContext
(
$shop
,
$config
)
;
$href
->
setLink
(
$this
->
filterUrl
(
(string)
$this
->rewriteRouter->
assemble
(
$parameters
,
$routingContext
)
,
$parameters
)
)
;
if
(
!
$config
->
get
(
'hrefLangCountry'
)
)
{
$href
->
setLocale
(
explode
(
'-',
$languageShop
[
'locale'
]
)
[
0
]
)
;
}
if
(
(int)
$languageShop
[
'id'
]
===
$config
->
get
(
'hrefLangDefaultShop'
)
)
{
$href
->
setLocale
(
'x-default'
)
;
}
if
(
$this
->config->
get
(
'hrefLangJustSeoUrl'
)
&& !
$this
->
isSeoUrl
(
$parameters
,
$href
->
getLink
(
)
,
$routingContext
)
)
{
continue
;
}