53 private $collectionProcessor;
80 $this->collectionProcessor = $collectionProcessor ?: $this->getCollectionProcessor();
90 }
catch (\Exception $e) {
111 'main_table.entity_type_id = entity_type.entity_type_id',
116 'main_table.attribute_id = eav_entity_attribute.attribute_id',
121 $additionalTable =
$entityType->getAdditionalAttributeTable();
122 if ($additionalTable) {
125 'main_table.attribute_id = additional_table.attribute_id',
142 $searchResults = $this->searchResultsFactory->create();
155 return $searchResults;
166 throw new NoSuchEntityException(
168 'The attribute with a "%1" attributeCode doesn\'t exist. Verify the attribute and try again.',
183 }
catch (\Exception $e) {
195 $attribute = $this->attributeFactory->create();
196 $this->eavResource->load(
$attribute, $attributeId);
200 __(
'The attribute with a "%1" ID doesn\'t exist. Verify the attribute and try again.', $attributeId)
214 private function getCollectionProcessor()
216 if (!$this->collectionProcessor) {
218 CollectionProcessor::class
221 return $this->collectionProcessor;
__construct(\Magento\Eav\Model\Config $eavConfig, \Magento\Eav\Model\ResourceModel\Entity\Attribute $eavResource, \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory $attributeCollectionFactory, \Magento\Eav\Api\Data\AttributeSearchResultsInterfaceFactory $searchResultsFactory, \Magento\Eav\Model\Entity\AttributeFactory $attributeFactory, \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface $joinProcessor, CollectionProcessorInterface $collectionProcessor=null)
save(\Magento\Eav\Api\Data\AttributeInterface $attribute)
getList($entityTypeCode, \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
$attributeCollectionFactory