File tree Expand file tree Collapse file tree 4 files changed +9
-16
lines changed
Config/Test/Unit/Block/System/Config/Form/Fieldset/Modules
lib/internal/Magento/Framework/Module Expand file tree Collapse file tree 4 files changed +9
-16
lines changed Original file line number Diff line number Diff line change 20
20
@deprecated Magento does not support custom disabling/enabling modules output since 2.2.0 version.
21
21
Section 'Advanced' was disabled. This section will be removed from code in one release.
22
22
-->
23
- <section id =" advanced" translate =" label" type =" text" sortOrder =" 910" showInDefault =" 0 " showInWebsite =" 0 " showInStore =" 0 " >
23
+ <section id =" advanced" translate =" label" type =" text" sortOrder =" 910" showInDefault =" 1 " showInWebsite =" 1 " showInStore =" 1 " >
24
24
<label >Advanced</label >
25
25
<tab >advanced</tab >
26
26
<resource >Magento_Backend::advanced</resource >
Original file line number Diff line number Diff line change 7
7
8
8
/**
9
9
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
10
- * @deprecated because \Magento\Config\Block\System\Config\Form\Fieldset\Modules\DisableOutput is deprecated
11
10
*/
12
11
class DisableOutputTest extends \PHPUnit \Framework \TestCase
13
12
{
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ class Manager
21
21
{
22
22
/**
23
23
* @var Output\ConfigInterface
24
- * @deprecated 100.2.0 Magento does not support custom disabling/enabling module output since 2.2.0 version.
25
- * The property can be removed in a future major release
26
24
*/
27
25
private $ _outputConfig ;
28
26
@@ -33,8 +31,6 @@ class Manager
33
31
34
32
/**
35
33
* @var array
36
- * @deprecated 100.2.0 Magento does not support custom disabling/enabling module output since 2.2.0 version.
37
- * The property can be removed in a future major release
38
34
*/
39
35
private $ _outputConfigPaths ;
40
36
@@ -69,14 +65,18 @@ public function isEnabled($moduleName)
69
65
*
70
66
* @param string $moduleName Fully-qualified module name
71
67
* @return boolean
72
- * @deprecated 100.2.0 Magento does not support custom disabling/enabling module output since 2.2.0 version
73
68
*/
74
69
public function isOutputEnabled ($ moduleName )
75
70
{
76
71
if (!$ this ->isEnabled ($ moduleName )) {
77
72
return false ;
78
73
}
79
-
74
+ if (!$ this ->_isCustomOutputConfigEnabled ($ moduleName )) {
75
+ return false ;
76
+ }
77
+ if ($ this ->_outputConfig ->isEnabled ($ moduleName )) {
78
+ return false ;
79
+ }
80
80
return true ;
81
81
}
82
82
@@ -85,7 +85,6 @@ public function isOutputEnabled($moduleName)
85
85
*
86
86
* @param string $moduleName Fully-qualified module name
87
87
* @return boolean
88
- * @deprecated
89
88
*/
90
89
protected function _isCustomOutputConfigEnabled ($ moduleName )
91
90
{
Original file line number Diff line number Diff line change 7
7
*/
8
8
namespace Magento \Framework \Module \Output ;
9
9
10
- /**
11
- * Checks whether the module is enabled in the configuration.
12
- *
13
- * @deprecated 100.2.0 Magento does not support custom disabling/enabling module output since 2.2.0 version
14
- */
15
10
class Config implements \Magento \Framework \Module \Output \ConfigInterface
16
11
{
17
12
/**
@@ -53,7 +48,7 @@ public function __construct(
53
48
*/
54
49
public function isEnabled ($ moduleName )
55
50
{
56
- return false ;
51
+ return $ this -> isSetFlag ( sprintf ( self :: XML_PATH_MODULE_OUTPUT_STATUS , $ moduleName )) ;
57
52
}
58
53
59
54
/**
@@ -65,6 +60,6 @@ public function isEnabled($moduleName)
65
60
*/
66
61
public function isSetFlag ($ path )
67
62
{
68
- return false ;
63
+ return $ this -> _scopeConfig -> isSetFlag ( $ path , $ this -> _storeType ) ;
69
64
}
70
65
}
You can’t perform that action at this time.
0 commit comments