コード例 #1
0
 /**
  * @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;
 }
コード例 #2
0
 /**
  * @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;
 }