Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getShopArrayByHostAlias example
$requestPath
=
$request
->
getRequestUri
(
)
;
$shops
=
$this
->
getShopsArrayByHost
(
$host
)
;
// returns the right shop depending on the url
$shop
=
$this
->
findShopForRequest
(
$shops
,
$requestPath
)
;
if
(
$shop
!== null
)
{
return
$shop
;
}
return
$this
->
getShopArrayByHostAlias
(
$host
)
;
}
/** * @return QueryBuilder */
public
function
getQueryBuilder
(
)
{
return
$this
->
createQueryBuilder
(
'shop'
)
->
addSelect
(
'shop'
)
->
addSelect
(
'main'
)