/** @var ShopContextInterface $context */
$context =
Shopware()->
Container()->
get(\Shopware\Bundle\StoreFrontBundle\Service\ContextServiceInterface::
class)->
getShopContext();
$categoryId =
$context->
getShop()->
getCategory()->
getId();
/** @var StoreFrontEmotionDeviceConfiguration $service */
$service =
$this->
get(\Shopware\Bundle\EmotionBundle\Service\StoreFrontEmotionDeviceConfigurationInterface::
class);
$emotions =
$service->
getCategoryConfiguration($categoryId,
$context);
$categoryContent =
Shopware()->
Modules()->
Categories()->
sGetCategoryContent($categoryId);
$this->
View()->
assign([ 'hasCustomerStreamEmotion' =>
$this->container->
get(\Shopware\Models\CustomerStream\CustomerStreamRepositoryInterface::
class)->
hasCustomerStreamEmotions($categoryId),
'emotions' =>
$emotions,
'hasEmotion' => !
empty($emotions),
'sCategoryContent' =>
$categoryContent,
'sBanner' =>
Shopware()->
Modules()->
Marketing()->
sBanner($categoryId),
]);
} /**
* Handle theme preview hash
*
* @return bool
*/