Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
text_attribute_rollback.php
Go to the documentation of this file.
1 <?php
6 /* Delete attribute with text_attribute code */
8 $registry->unregister('isSecureArea');
9 $registry->register('isSecureArea', true);
12  'Magento\Catalog\Model\ResourceModel\Eav\Attribute'
13 );
14 $attribute->load('text_attribute', 'attribute_code');
15 $attribute->delete();
16 
17 $registry->unregister('isSecureArea');
18 $registry->register('isSecureArea', false);