Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
attribute_sets_rollback.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
10 $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
11  ->load('Super Powerful Muffins', 'attribute_set_name');
12 if ($attributeSet->getId()) {
13  $attributeSet->delete();
14 }
15 
16 $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
17  ->load('Banana Rangers', 'attribute_set_name');
18 if ($attributeSet->getId()) {
19  $attributeSet->delete();
20 }
21 
22 $attributeSet = $objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
23  ->load('Guardians of the Refrigerator', 'attribute_set_name');
24 if ($attributeSet->getId()) {
25  $attributeSet->delete();
26 }