19 private $attributeRepository;
24 private $attributeManagement;
29 private $attributeFactory;
34 private $optionFactory;
39 private $attributeSetFactory;
44 private $attributeGroupFactory;
49 private $attributeSetManagement;
54 private $attributeGroupRepository;
69 \
Magento\Catalog\Api\AttributeSetManagementInterface $attributeSetManagement,
70 \
Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface $attributeGroupRepository,
71 \
Magento\Catalog\Api\ProductAttributeRepositoryInterface $attributeRepository,
72 \
Magento\Catalog\Api\ProductAttributeManagementInterface $attributeManagement,
73 \
Magento\Catalog\Api\
Data\ProductAttributeInterfaceFactory $attributeFactory,
74 \
Magento\Eav\Api\
Data\AttributeOptionInterfaceFactory $optionFactory,
75 \
Magento\Eav\Api\
Data\AttributeSetInterfaceFactory $attributeSetFactory,
76 \
Magento\Eav\Api\
Data\AttributeGroupInterfaceFactory $attributeGroupFactory
79 $this->attributeManagement = $attributeManagement;
80 $this->attributeFactory = $attributeFactory;
81 $this->optionFactory = $optionFactory;
133 $productAttribute = $this->attributeRepository->save(
$attribute);
134 $attributeId = $productAttribute->getAttributeId();
__construct(\Magento\Catalog\Api\AttributeSetManagementInterface $attributeSetManagement, \Magento\Catalog\Api\ProductAttributeGroupRepositoryInterface $attributeGroupRepository, \Magento\Catalog\Api\ProductAttributeRepositoryInterface $attributeRepository, \Magento\Catalog\Api\ProductAttributeManagementInterface $attributeManagement, \Magento\Catalog\Api\Data\ProductAttributeInterfaceFactory $attributeFactory, \Magento\Eav\Api\Data\AttributeOptionInterfaceFactory $optionFactory, \Magento\Eav\Api\Data\AttributeSetInterfaceFactory $attributeSetFactory, \Magento\Eav\Api\Data\AttributeGroupInterfaceFactory $attributeGroupFactory)
$attributeGroupRepository