$container =
Shopware()->
Container();
$category =
$container->
get('shop'
)->
getCategory();
$this->categoryId =
(int) ($category ?
$category->
getId() : 0
);
$this->contextService =
$contextService ??
$container->
get(ContextServiceInterface::
class);
$this->customerGroupId =
(int) $this->contextService->
getShopContext()->
getCurrentCustomerGroup()->
getId();
$this->additionalTextService =
$additionalTextService ??
$container->
get(AdditionalTextServiceInterface::
class);
$this->config =
$config ??
$container->
get('config'
);
$this->productModule =
$productModule ??
$container->
get('modules'
)->
Articles();
$this->basketModule =
$basketModule ??
$container->
get('modules'
)->
Basket();
$this->front =
$front ?:
$container->
get('front'
);
$this->connection =
$connection ?:
$container->
get(Connection::
class);
$this->modelManager =
$modelManager ?:
$container->
get(ModelManager::
class);
$this->mediaService =
$mediaService ?:
$container->
get(MediaServiceInterface::
class);
$this->storefrontMediaService =
$storefrontMediaService ?:
$container->
get(StorefrontMediaServiceInterface::
class);
$this->legacyStructConverter =
$legacyStructConverter ?:
$container->
get(LegacyStructConverter::
class);
$this->eventManager =
$eventManager ?:
$container->
get(ContainerAwareEventManager::
class);
} /**
* @param int $articleId
* @param int $limit
*
* @return array<array<string, mixed>>
*/