Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
fetchStreamListing example
$categoryId
=
(int)
$this
->
Request
(
)
->
getParam
(
'sCategory'
)
;
$context
=
$this
->container->
get
(
ContextServiceInterface::
class
)
->
getShopContext
(
)
;
$category
=
$this
->container->
get
(
CategoryGateway::
class
)
->
get
(
$categoryId
,
$context
)
;
if
(
$category
instanceof Category
)
{
$productStream
=
$category
->
getProductStream
(
)
;
if
(
$productStream
)
{
$result
=
$this
->
fetchStreamListing
(
$categoryId
,
$productStream
->
getId
(
)
)
;
$this
->
setSearchResultResponse
(
$result
)
;
return
;
}
}
$result
=
$this
->
fetchCategoryListing
(
)
;
$this
->
setSearchResultResponse
(
$result
)
;
}
/** * @return void */