/** * @return GroupInterface */ protected function getGroup() { $groupId = $this->request->get('id', null); if (!$groupId) { $groupId = $this->requestParams->get('currentGroup', null); } $group = $this->groupRepository->find($groupId); return $group; }
/** * @return array */ protected function getAttributeIdsFromProductGroupAxes() { $attributeIds = []; if (null !== ($productGroupId = $this->getProductGroupId())) { $group = $this->productGroupRepository->find($productGroupId); if ($group->getType()->isVariant()) { foreach ($group->getAxisAttributes() as $axis) { $attributeIds[] = $axis->getId(); } } } return $attributeIds; }