/** * Retrieve EAV attribute metadata of category * * @param int $attributeSetId * @return AttributeMetadata[] */ public function getCategoryAttributesMetadata($attributeSetId = MetadataServiceInterface::DEFAULT_ATTRIBUTE_SET_ID) { $this->searchCriteriaBuilder->addFilter([$this->filterBuilder->setField('attribute_set_id')->setValue($attributeSetId)->create()]); return $this->metadataService->getAllAttributeMetadata(MetadataServiceInterface::ENTITY_TYPE, $this->searchCriteriaBuilder->create())->getItems(); }
/** * {@inheritdoc} */ public function search(\Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria) { return $this->metadataService->getAllAttributeMetadata(MetadataServiceInterface::ENTITY_TYPE, $searchCriteria); }
/** * {@inheritdoc} */ public function options($id) { return $this->metadataService->getAttributeMetadata(\Magento\Catalog\Service\V1\Product\MetadataServiceInterface::ENTITY_TYPE, $id)->getOptions(); }