Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
AttributeManagement Class Reference
Inheritance diagram for AttributeManagement:
AttributeManagementInterface

Public Member Functions

 __construct (\Magento\Eav\Api\AttributeSetRepositoryInterface $setRepository, \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection $attributeCollection, \Magento\Eav\Model\Config $eavConfig, \Magento\Eav\Model\ConfigFactory $entityTypeFactory, \Magento\Eav\Api\AttributeGroupRepositoryInterface $groupRepository, \Magento\Eav\Api\AttributeRepositoryInterface $attributeRepository, \Magento\Eav\Model\ResourceModel\Entity\Attribute $attributeResource, \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory $attributeCollectionFactory=null)
 
- Public Member Functions inherited from AttributeManagementInterface
 assign ($entityTypeCode, $attributeSetId, $attributeGroupId, $attributeCode, $sortOrder)
 
 unassign ($attributeSetId, $attributeCode)
 
 getAttributes ($entityTypeCode, $attributeSetId)
 

Protected Attributes

 $setRepository
 
 $attributeCollection
 
 $eavConfig
 
 $entityTypeFactory
 
 $groupRepository
 
 $attributeRepository
 
 $attributeResource
 

Detailed Description

@SuppressWarnings(PHPMD.CouplingBetweenObjects)

Definition at line 17 of file AttributeManagement.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Eav\Api\AttributeSetRepositoryInterface  $setRepository,
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection  $attributeCollection,
\Magento\Eav\Model\Config  $eavConfig,
\Magento\Eav\Model\ConfigFactory  $entityTypeFactory,
\Magento\Eav\Api\AttributeGroupRepositoryInterface  $groupRepository,
\Magento\Eav\Api\AttributeRepositoryInterface  $attributeRepository,
\Magento\Eav\Model\ResourceModel\Entity\Attribute  $attributeResource,
\Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory  $attributeCollectionFactory = null 
)

Constructor

Parameters
\Magento\Eav\Api\AttributeSetRepositoryInterface$setRepository
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection$attributeCollection
Config$eavConfig
ConfigFactory$entityTypeFactory
\Magento\Eav\Api\AttributeGroupRepositoryInterface$groupRepository
\Magento\Eav\Api\AttributeRepositoryInterface$attributeRepository
\Magento\Eav\Model\ResourceModel\Entity\Attribute$attributeResource
\Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory | null$attributeCollectionFactory

Definition at line 73 of file AttributeManagement.php.

82  {
83  $this->setRepository = $setRepository;
84  $this->attributeCollection = $attributeCollection;
85  $this->eavConfig = $eavConfig;
86  $this->entityTypeFactory = $entityTypeFactory;
87  $this->groupRepository = $groupRepository;
88  $this->attributeRepository = $attributeRepository;
89  $this->attributeResource = $attributeResource;
90  $this->attributeCollectionFactory = $attributeCollectionFactory ?: ObjectManager::getInstance()
91  ->get(\Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory::class);
92  }

Field Documentation

◆ $attributeCollection

$attributeCollection
protected

Definition at line 29 of file AttributeManagement.php.

◆ $attributeRepository

$attributeRepository
protected

Definition at line 49 of file AttributeManagement.php.

◆ $attributeResource

$attributeResource
protected

Definition at line 54 of file AttributeManagement.php.

◆ $eavConfig

$eavConfig
protected

Definition at line 34 of file AttributeManagement.php.

◆ $entityTypeFactory

$entityTypeFactory
protected

Definition at line 39 of file AttributeManagement.php.

◆ $groupRepository

$groupRepository
protected

Definition at line 44 of file AttributeManagement.php.

◆ $setRepository

$setRepository
protected

Definition at line 22 of file AttributeManagement.php.


The documentation for this class was generated from the following file: