Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
category_attribute_rollback.php
Go to the documentation of this file.
1 <?php
9 
10 $registry->unregister('isSecureArea');
11 $registry->register('isSecureArea', true);
12 
15  ->create(\Magento\Catalog\Model\ResourceModel\Eav\Attribute::class);
16 
17 $attribute->loadByCode(3, 'test_attribute_code_666');
18 
19 if ($attribute->getId()) {
20  $attribute->delete();
21 }
22 
23 $registry->unregister('isSecureArea');
24 $registry->register('isSecureArea', false);