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
module-config
Model
Config
Structure
ConcealInProductionConfigList.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Config\Model\Config\Structure
;
7
8
use
Magento\Framework\App\State
;
9
18
class
ConcealInProductionConfigList
implements
ElementVisibilityInterface
19
{
38
private
$configs = [];
39
45
private
$state;
46
51
public
function
__construct
(
State
$state, array $configs = [])
52
{
53
$this->state = $state;
54
$this->configs = $configs;
55
}
56
62
public
function
isHidden
(
$path
)
63
{
64
$path
= $this->normalizePath(
$path
);
65
66
return
$this->state->getMode() ===
State::MODE_PRODUCTION
67
&& !empty($this->configs[
$path
])
68
&& $this->configs[
$path
] === static::HIDDEN;
69
}
70
76
public
function
isDisabled
(
$path
)
77
{
78
$path
= $this->normalizePath(
$path
);
79
if
($this->state->getMode() ===
State::MODE_PRODUCTION
) {
80
while
(
true
) {
81
if
(!empty($this->configs[
$path
])) {
82
return
$this->configs[
$path
] === static::DISABLED;
83
}
84
85
$position = strripos(
$path
,
'/'
);
86
if
($position ===
false
) {
87
break
;
88
}
89
$path
= substr(
$path
, 0, $position);
90
}
91
}
92
93
return
false
;
94
}
95
102
private
function
normalizePath(
$path
)
103
{
104
return
trim(
$path
,
'/'
);
105
}
106
}
Magento\Config\Model\Config\Structure\ElementVisibilityInterface
Definition:
ElementVisibilityInterface.php:14
Magento\Framework\App\State\MODE_PRODUCTION
const MODE_PRODUCTION
Definition:
State.php:76
Magento\Config\Model\Config\Structure\ConcealInProductionConfigList
Definition:
ConcealInProductionConfigList.php:18
Magento\Framework\App\State
Definition:
State.php:17
Magento\Config\Model\Config\Structure\ConcealInProductionConfigList\isDisabled
isDisabled($path)
Definition:
ConcealInProductionConfigList.php:76
Magento\Framework\App\State
Definition:
CleanupFiles.php:7
Magento\Config\Model\Config\Structure\ConcealInProductionConfigList\isHidden
isHidden($path)
Definition:
ConcealInProductionConfigList.php:62
Magento\Config\Model\Config\Structure
Definition:
AbstractElement.php:6
Magento\Config\Model\Config\Structure\ConcealInProductionConfigList\__construct
__construct(State $state, array $configs=[])
Definition:
ConcealInProductionConfigList.php:51
$path
$path
Definition:
import_with_filesystem_images.php:14