@@ -21,18 +21,28 @@ class Manager
21
21
{
22
22
/**
23
23
* @var Output\ConfigInterface
24
+ * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
25
+ * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
26
+ * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
27
+ * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
28
+ * issues that will be addressed in future releases.
24
29
*/
25
- private $ _outputConfig ;
30
+ private $ outputConfig ;
26
31
27
32
/**
28
33
* @var ModuleListInterface
29
34
*/
30
- private $ _moduleList ;
35
+ private $ moduleList ;
31
36
32
37
/**
33
38
* @var array
39
+ * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
40
+ * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
41
+ * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
42
+ * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
43
+ * issues that will be addressed in future releases.
34
44
*/
35
- private $ _outputConfigPaths ;
45
+ private $ outputConfigPaths ;
36
46
37
47
/**
38
48
* @param Output\ConfigInterface $outputConfig
@@ -44,9 +54,9 @@ public function __construct(
44
54
ModuleListInterface $ moduleList ,
45
55
array $ outputConfigPaths = []
46
56
) {
47
- $ this ->_outputConfig = $ outputConfig ;
48
- $ this ->_moduleList = $ moduleList ;
49
- $ this ->_outputConfigPaths = $ outputConfigPaths ;
57
+ $ this ->outputConfig = $ outputConfig ;
58
+ $ this ->moduleList = $ moduleList ;
59
+ $ this ->outputConfigPaths = $ outputConfigPaths ;
50
60
}
51
61
52
62
/**
@@ -57,43 +67,46 @@ public function __construct(
57
67
*/
58
68
public function isEnabled ($ moduleName )
59
69
{
60
- return $ this ->_moduleList ->has ($ moduleName );
70
+ return $ this ->moduleList ->has ($ moduleName );
61
71
}
62
72
63
73
/**
64
74
* Whether a module output is permitted by the configuration or not
65
75
*
66
76
* @param string $moduleName Fully-qualified module name
67
77
* @return boolean
78
+ * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
79
+ * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
80
+ * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
81
+ * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
82
+ * issues that will be addressed in future releases.
68
83
*/
69
84
public function isOutputEnabled ($ moduleName )
70
85
{
71
- if (!$ this ->isEnabled ($ moduleName )) {
72
- return false ;
73
- }
74
- if (!$ this ->_isCustomOutputConfigEnabled ($ moduleName )) {
75
- return false ;
76
- }
77
- if ($ this ->_outputConfig ->isEnabled ($ moduleName )) {
78
- return false ;
79
- }
80
- return true ;
86
+ return $ this ->isEnabled ($ moduleName )
87
+ && $ this ->_isCustomOutputConfigEnabled ($ moduleName )
88
+ && !$ this ->outputConfig ->isEnabled ($ moduleName );
81
89
}
82
90
83
91
/**
84
92
* Whether a configuration switch for a module output permits output or not
85
93
*
86
94
* @param string $moduleName Fully-qualified module name
87
95
* @return boolean
96
+ * @deprecated 100.2.0 Magento does not support disabling/enabling modules output from the Admin Panel since 2.2.0
97
+ * version. Module output can still be enabled/disabled in configuration files. However, this functionality should
98
+ * not be used in future development. Module design should explicitly state dependencies to avoid requiring output
99
+ * disabling. This functionality will temporarily be kept in Magento core, as there are unresolved modularity
100
+ * issues that will be addressed in future releases.
88
101
*/
89
102
protected function _isCustomOutputConfigEnabled ($ moduleName )
90
103
{
91
- if (isset ($ this ->_outputConfigPaths [$ moduleName ])) {
92
- $ configPath = $ this ->_outputConfigPaths [$ moduleName ];
104
+ if (isset ($ this ->outputConfigPaths [$ moduleName ])) {
105
+ $ configPath = $ this ->outputConfigPaths [$ moduleName ];
93
106
if (defined ($ configPath )) {
94
107
$ configPath = constant ($ configPath );
95
108
}
96
- return $ this ->_outputConfig ->isSetFlag ($ configPath );
109
+ return $ this ->outputConfig ->isSetFlag ($ configPath );
97
110
}
98
111
return true ;
99
112
}
0 commit comments