Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Catalog\Model\ResourceModel\Attribute $attributeResource, \Magento\Catalog\Helper\Product $productHelper, \Magento\Framework\Filter\FilterManager $filterManager, \Magento\Eav\Api\AttributeRepositoryInterface $eavAttributeRepository, \Magento\Eav\Model\Config $eavConfig, \Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype\ValidatorFactory $validatorFactory, \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder) | |
get ($attributeCode) | |
getList (\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria) | |
save (\Magento\Catalog\Api\Data\ProductAttributeInterface $attribute) | |
delete (\Magento\Catalog\Api\Data\ProductAttributeInterface $attribute) | |
deleteById ($attributeCode) | |
getCustomAttributesMetadata ($dataObjectClassName=null) | |
![]() | |
getList (\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria) | |
Protected Member Functions | |
generateCode ($label) | |
validateCode ($code) | |
Protected Attributes | |
$attributeResource | |
$eavAttributeRepository | |
$eavConfig | |
$inputtypeValidatorFactory | |
$productHelper | |
$filterManager | |
$searchCriteriaBuilder | |
@SuppressWarnings(PHPMD.CouplingBetweenObjects)
Definition at line 16 of file Repository.php.
__construct | ( | \Magento\Catalog\Model\ResourceModel\Attribute | $attributeResource, |
\Magento\Catalog\Helper\Product | $productHelper, | ||
\Magento\Framework\Filter\FilterManager | $filterManager, | ||
\Magento\Eav\Api\AttributeRepositoryInterface | $eavAttributeRepository, | ||
\Magento\Eav\Model\Config | $eavConfig, | ||
\Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype\ValidatorFactory | $validatorFactory, | ||
\Magento\Framework\Api\SearchCriteriaBuilder | $searchCriteriaBuilder | ||
) |
\Magento\Catalog\Model\ResourceModel\Attribute | $attributeResource | |
\Magento\Catalog\Helper\Product | $productHelper | |
\Magento\Framework\Filter\FilterManager | $filterManager | |
\Magento\Eav\Api\AttributeRepositoryInterface | $eavAttributeRepository | |
\Magento\Eav\Model\Config | $eavConfig | |
\Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype\ValidatorFactory | $validatorFactory | |
\Magento\Framework\Api\SearchCriteriaBuilder | $searchCriteriaBuilder |
Definition at line 62 of file Repository.php.
delete | ( | \Magento\Catalog\Api\Data\ProductAttributeInterface | $attribute | ) |
{Delete Attribute
\Magento\Catalog\Api\Data\ProductAttributeInterface | $attribute |
Implements ProductAttributeRepositoryInterface.
Definition at line 185 of file Repository.php.
deleteById | ( | $attributeCode | ) |
{Delete Attribute by id
string | $attributeCode |
Implements ProductAttributeRepositoryInterface.
Definition at line 194 of file Repository.php.
|
protected |
Generate code from label
string | $label |
Definition at line 217 of file Repository.php.
get | ( | $attributeCode | ) |
{Retrieve specific attribute
string | $attributeCode |
Implements ProductAttributeRepositoryInterface.
Definition at line 83 of file Repository.php.
getCustomAttributesMetadata | ( | $dataObjectClassName = null | ) |
{Get custom attribute metadata for the given class or interfaces it implements.
string | null | $dataObjectClassName | Data object class name |
Implements MetadataServiceInterface.
Definition at line 206 of file Repository.php.
getList | ( | \Magento\Framework\Api\SearchCriteriaInterface | $searchCriteria | ) |
save | ( | \Magento\Catalog\Api\Data\ProductAttributeInterface | $attribute | ) |
{Save attribute data
\Magento\Catalog\Api\Data\ProductAttributeInterface | $attribute |
Implements ProductAttributeRepositoryInterface.
Definition at line 107 of file Repository.php.
|
protected |
Validate attribute code
string | $code |
Definition at line 234 of file Repository.php.
|
protected |
Definition at line 21 of file Repository.php.
|
protected |
Definition at line 26 of file Repository.php.
|
protected |
Definition at line 31 of file Repository.php.
|
protected |
Definition at line 46 of file Repository.php.
|
protected |
Definition at line 36 of file Repository.php.
|
protected |
Definition at line 41 of file Repository.php.
|
protected |
Definition at line 51 of file Repository.php.