Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
category_attribute.php
Go to the documentation of this file.
1 <?php
9  ->create(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class);
10 $attribute->setAttributeCode('test_attribute_code_666')
11  ->setEntityTypeId(3)
12  ->setIsGlobal(1);
13 $attribute->save();