Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
integration
testsuite
Magento
CatalogSearch
_files
search_attributes_rollback.php
Go to the documentation of this file.
1
<?php
8
$registry
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
()->get(\
Magento
\Framework\Registry::class);
9
10
$registry
->unregister(
'isSecureArea'
);
11
$registry
->register(
'isSecureArea'
,
true
);
12
13
$eavConfig
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
()->get(\
Magento
\Eav\Model\Config::class);
14
$attributesCode
= [
'test_advanced_search'
,
'test_quick_search'
,
'test_catalog_view'
];
15
16
foreach
([
'test_quick_search'
,
'test_catalog_view'
] as
$code
) {
17
$attribute
=
$eavConfig
->getAttribute(
'catalog_product'
,
$code
);
18
if
(
$attribute
instanceof \
Magento
\Eav\Model\Entity\Attribute\AbstractAttribute
19
&&
$attribute
->getId()
20
) {
21
$attribute
->delete();
22
}
23
}
24
$eavConfig
->clear();
25
26
$registry
->unregister(
'isSecureArea'
);
27
$registry
->register(
'isSecureArea'
,
false
);
$registry
$registry
Definition:
search_attributes_rollback.php:8
$eavConfig
$eavConfig
Definition:
search_attributes_rollback.php:13
$attribute
$attribute
Definition:
attribute_set_with_image_attribute.php:41
Magento
$attributesCode
$attributesCode
Definition:
search_attributes_rollback.php:14
$code
$code
Definition:
info.phtml:12
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125