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
Widget
_files
layout_update.php
Go to the documentation of this file.
1
<?php
8
$objectManager
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
();
9
$objectManager
->get(\
Magento
\Framework\
App
\AreaList::class)
10
->getArea(\
Magento
\Backend\
App
\Area\FrontNameResolver::AREA_CODE)
11
->load(\
Magento
\Framework\
App
\Area::PART_CONFIG);
13
$theme
=
$objectManager
->create(\
Magento
\Framework\View\Design\ThemeInterface::class);
14
$theme
->setThemePath(
15
'test/test'
16
)->setArea(
17
'frontend'
18
)->setThemeTitle(
19
'Test Theme'
20
)->setType(
21
\
Magento
\Framework\View\Design\ThemeInterface::TYPE_VIRTUAL
22
)->save();
23
25
$updateNotTemporary
=
$objectManager
->create(\
Magento
\Widget\Model\Layout\Update::class);
26
$updateNotTemporary
->setHandle(
27
'test_handle'
28
)->setXml(
29
'not_temporary'
30
)->setStoreId(
31
0
32
)->setThemeId(
33
$theme
->getId()
34
)->save();
35
37
$updateTemporary
=
$objectManager
->create(\
Magento
\Widget\Model\Layout\Update::class);
38
$updateTemporary
->setHandle(
39
'test_handle'
40
)->setIsTemporary(
41
1
42
)->setXml(
43
'temporary'
44
)->setStoreId(
45
0
46
)->setThemeId(
47
$theme
->getId()
48
)->save();
Magento\Framework\App
$updateTemporary
$updateTemporary
Definition:
layout_update.php:37
$theme
$theme
Definition:
layout_update.php:13
Magento
$objectManager
$objectManager
Definition:
layout_update.php:8
$updateNotTemporary
$updateNotTemporary
Definition:
layout_update.php:25
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125