示例#1
0
 /**
  * {@inheritdoc}
  */
 public function getList($attributeSetId)
 {
     if (!$this->attributeSetFactory->create()->load($attributeSetId)->getId()) {
         throw NoSuchEntityException::singleField('attributeSetId', $attributeSetId);
     }
     $collection = $this->groupListFactory->create();
     $collection->setAttributeSetFilter($attributeSetId);
     $collection->setSortOrder();
     $groups = array();
     /** @var $group \Magento\Eav\Model\Entity\Attribute\Group */
     foreach ($collection->getItems() as $group) {
         $this->groupBuilder->setId($group->getId())->setName($group->getAttributeGroupName());
         $groups[] = $this->groupBuilder->create();
     }
     return $groups;
 }