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
Elasticsearch
_files
indexer_rollback.php
Go to the documentation of this file.
1
<?php
8
$objectManager
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
();
9
11
$registry
=
$objectManager
->get(\
Magento
\Framework\Registry::class);
12
$registry
->unregister(
'isSecureArea'
);
13
$registry
->register(
'isSecureArea'
,
true
);
14
16
$collection
=
$objectManager
->create(\
Magento
\Catalog\Model\
ResourceModel
\Product\Collection::class);
17
$collection
->addAttributeToSelect(
'id'
)->load();
18
if
(
$collection
->count() > 0) {
19
$collection
->delete();
20
}
21
23
$store
=
$objectManager
->create(\
Magento
\Store\Model\Store::class);
24
$storeCode
=
'secondary'
;
25
$store
->load(
$storeCode
);
26
if
(
$store
->getId()) {
27
$store
->delete();
28
}
29
30
$registry
->unregister(
'isSecureArea'
);
31
$registry
->register(
'isSecureArea'
,
false
);
$storeCode
$storeCode
Definition:
indexer_rollback.php:24
$collection
$collection
Definition:
indexer_rollback.php:16
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
$objectManager
$objectManager
Definition:
indexer_rollback.php:8
Magento
$registry
$registry
Definition:
indexer_rollback.php:11
$store
$store
Definition:
indexer_rollback.php:23
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125