Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
empty_attribute_set.php
Go to the documentation of this file.
1 <?php
8 $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class);
9 $entityTypeId = $objectManager->create(\Magento\Eav\Model\Entity\Type::class)->loadByCode('catalog_product')->getId();
10 $attributeSet->setData([
11  'attribute_set_name' => 'empty_attribute_set',
12  'entity_type_id' => $entityTypeId,
13  'sort_order' => 200,
14 ]);
15 $attributeSet->validate();
16 $attributeSet->save();
$objectManager