Make it possible to pass the module paths directly to the module manager
This commit is contained in:
parent
ffc69c378c
commit
64e6886c9c
|
@ -487,11 +487,14 @@ class Manager
|
|||
/**
|
||||
* Detect installed modules from every path provided in modulePaths
|
||||
*
|
||||
* @param array $availableDirs Installed modules location
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function detectInstalledModules()
|
||||
public function detectInstalledModules(array $availableDirs = null)
|
||||
{
|
||||
foreach ($this->modulePaths as $basedir) {
|
||||
$modulePaths = $availableDirs !== null ? $availableDirs : $this->modulePaths;
|
||||
foreach ($modulePaths as $basedir) {
|
||||
$canonical = realpath($basedir);
|
||||
if ($canonical === false) {
|
||||
Logger::warning('Module path "%s" does not exist', $basedir);
|
||||
|
|
Loading…
Reference in New Issue