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 77
88use Magento \Framework \App \DeploymentConfig ;
99use Magento \Framework \Config \ConfigOptionsListConstants ;
10+ use Magento \Framework \Module \ModuleList \Loader ;
1011
1112/**
1213 * A list of modules in the Magento application
@@ -26,7 +27,7 @@ class ModuleList implements ModuleListInterface
2627 /**
2728 * Loader of module information from source code
2829 *
29- * @var ModuleList\ Loader
30+ * @var Loader
3031 */
3132 private $ loader ;
3233
@@ -50,9 +51,9 @@ class ModuleList implements ModuleListInterface
5051 * Constructor
5152 *
5253 * @param DeploymentConfig $config
53- * @param ModuleList\ Loader $loader
54+ * @param Loader $loader
5455 */
55- public function __construct (DeploymentConfig $ config , ModuleList \ Loader $ loader )
56+ public function __construct (DeploymentConfig $ config , Loader $ loader )
5657 {
5758 $ this ->config = $ config ;
5859 $ this ->loader = $ loader ;
@@ -98,10 +99,17 @@ public function getOne($name)
9899 public function getNames ()
99100 {
100101 $ this ->loadConfigData ();
102+
103+ $ modulesList = array_keys ($ this ->loader ->load ());
104+
101105 if (!$ this ->configData ) {
102106 return [];
103107 }
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+
105113 return $ result ;
106114 }
107115
You can’t perform that action at this time.
0 commit comments