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
framework
View
Design
Fallback
Rule
ModularSwitch.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\Design\Fallback\Rule
;
7
13
class
ModularSwitch
implements
RuleInterface
14
{
20
protected
$ruleNonModular
;
21
27
protected
$ruleModular
;
28
35
public
function
__construct
(
RuleInterface
$ruleNonModular
,
RuleInterface
$ruleModular
)
36
{
37
$this->ruleNonModular =
$ruleNonModular
;
38
$this->ruleModular =
$ruleModular
;
39
}
40
47
public
function
getPatternDirs
(array
$params
)
48
{
49
if
(isset(
$params
[
'module_name'
])) {
50
return
$this->ruleModular->getPatternDirs(
$params
);
51
}
else
{
52
return
$this->ruleNonModular->getPatternDirs(
$params
);
53
}
54
}
55
}
Magento\Framework\View\Design\Fallback\Rule\RuleInterface
Definition:
RuleInterface.php:13
Magento\Framework\View\Design\Fallback\Rule\ModularSwitch\getPatternDirs
getPatternDirs(array $params)
Definition:
ModularSwitch.php:47
Magento\Framework\View\Design\Fallback\Rule
Definition:
Composite.php:6
Magento\Framework\View\Design\Fallback\Rule\ModularSwitch\$ruleNonModular
$ruleNonModular
Definition:
ModularSwitch.php:20
Magento\Framework\View\Design\Fallback\Rule\ModularSwitch
Definition:
ModularSwitch.php:13
Magento\Framework\View\Design\Fallback\Rule\ModularSwitch\__construct
__construct(RuleInterface $ruleNonModular, RuleInterface $ruleModular)
Definition:
ModularSwitch.php:35
$params
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition:
website.php:18
Magento\Framework\View\Design\Fallback\Rule\ModularSwitch\$ruleModular
$ruleModular
Definition:
ModularSwitch.php:27