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
Sales
_files
default_rollback.php
Go to the documentation of this file.
1
<?php
7
use
Magento\TestFramework\Helper\Bootstrap
;
8
10
$registry
= Bootstrap::getObjectManager()->get(\
Magento
\Framework\Registry::class);
11
$registry
->unregister(
'isSecureArea'
);
12
$registry
->register(
'isSecureArea'
,
true
);
13
15
$orderCollection
= Bootstrap::getObjectManager()->create(\
Magento
\Sales\Model\
ResourceModel
\Order\Collection::class);
16
foreach
(
$orderCollection
as
$order
) {
17
$order
->delete();
18
}
19
21
$productCollection
= Bootstrap::getObjectManager()->create(
22
\
Magento
\Catalog\Model\
ResourceModel
\Product\Collection::class
23
);
24
foreach
(
$productCollection
as
$product
) {
25
$product
->delete();
26
}
27
29
$stockRegistryStorage
= Bootstrap::getObjectManager()
30
->get(\
Magento
\CatalogInventory\Model\StockRegistryStorage::class);
31
$stockRegistryStorage
->clean();
32
33
$registry
->unregister(
'isSecureArea'
);
34
$registry
->register(
'isSecureArea'
,
false
);
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
$stockRegistryStorage
$stockRegistryStorage
Definition:
default_rollback.php:29
Magento\TestFramework\Helper\Bootstrap
Definition:
Bootstrap.php:12
$order
$order
Definition:
order.php:55
$registry
$registry
Definition:
default_rollback.php:10
$productCollection
$productCollection
Definition:
default_rollback.php:21
Magento
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
$orderCollection
$orderCollection
Definition:
default_rollback.php:15