File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
lib/internal/Magento/Framework/Module Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Framework \App \DeploymentConfig ;
9
9
use Magento \Framework \Config \ConfigOptionsListConstants ;
10
+ use Magento \Framework \Module \ModuleList \Loader ;
10
11
11
12
/**
12
13
* A list of modules in the Magento application
@@ -26,7 +27,7 @@ class ModuleList implements ModuleListInterface
26
27
/**
27
28
* Loader of module information from source code
28
29
*
29
- * @var ModuleList\ Loader
30
+ * @var Loader
30
31
*/
31
32
private $ loader ;
32
33
@@ -50,9 +51,9 @@ class ModuleList implements ModuleListInterface
50
51
* Constructor
51
52
*
52
53
* @param DeploymentConfig $config
53
- * @param ModuleList\ Loader $loader
54
+ * @param Loader $loader
54
55
*/
55
- public function __construct (DeploymentConfig $ config , ModuleList \ Loader $ loader )
56
+ public function __construct (DeploymentConfig $ config , Loader $ loader )
56
57
{
57
58
$ this ->config = $ config ;
58
59
$ this ->loader = $ loader ;
@@ -98,10 +99,17 @@ public function getOne($name)
98
99
public function getNames ()
99
100
{
100
101
$ this ->loadConfigData ();
102
+
103
+ $ modulesList = array_keys ($ this ->loader ->load ());
104
+
101
105
if (!$ this ->configData ) {
102
106
return [];
103
107
}
104
- $ result = array_keys (array_filter ($ this ->configData ));
108
+
109
+ $ modulesInConfig = array_keys (array_filter ($ this ->configData ));
110
+
111
+ $ result = array_intersect ($ modulesInConfig , $ modulesList );
112
+
105
113
return $ result ;
106
114
}
107
115
You can’t perform that action at this time.
0 commit comments