Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setCurrencies example
protected
function
fixActive
(
Shop
$shop
)
{
$shop
= DetachedShop::
createFromShop
(
$shop
)
;
$main
=
$shop
->
getMain
(
)
;
if
(
$main
!== null
)
{
$main
= DetachedShop::
createFromShop
(
$main
)
;
$shop
->
setHost
(
$main
->
getHost
(
)
)
;
$shop
->
setSecure
(
$main
->
getSecure
(
)
)
;
$shop
->
setBasePath
(
$shop
->
getBasePath
(
)
?:
$main
->
getBasePath
(
)
)
;
$shop
->
setTemplate
(
$main
->
getTemplate
(
)
)
;
$shop
->
setCurrencies
(
$main
->
getCurrencies
(
)
)
;
$shop
->
setChildren
(
$main
->
getChildren
(
)
)
;
$shop
->
setCustomerScope
(
$main
->
getCustomerScope
(
)
)
;
}
$shop
->
setBaseUrl
(
$shop
->
getBaseUrl
(
)
?:
$shop
->
getBasePath
(
)
)
;
return
DetachedShop::
createFromShop
(
$shop
)
;
}
/** * returns the right shop depending on the request object * * @param array[] $shops * @param string $requestPath * * @return array|null */