@param array $moduleControllersByModuleId

@return array The input array
439813
protected function flattenControllersMap(array $moduleControllersByModuleId)
    {
        $moduleControllersFlat = [];
        foreach ($moduleControllersByModuleId as $moduleControllersOfOneModule) {
            $moduleControllersFlat = array_merge($moduleControllersFlat, $moduleControllersOfOneModule);
        }
        return $moduleControllersFlat;
    }
1070173
private function getIndexesByModule($module)
    {
        // Indexes to be removed
        $indexes = array();

        foreach ($this->data as $index => $row) {
            if (isset($row[ConstProviderInterface::CONFIG_PARAM_MODULE]) && $row[ConstProviderInterface::CONFIG_PARAM_MODULE] == $module) {
                array_push($indexes, $index);
            }
        }

        return $indexes;
    }
755559
public function getControllerMap()
    {
        $controllerMap = [];
        $moduleControllersByModuleId = Registry::getUtilsObject()->getModuleVar(ClassProviderStorage::STORAGE_KEY);

        if (is_array($moduleControllersByModuleId)) {
            $controllerMap = $this->flattenControllersMap($moduleControllersByModuleId);
        }

        return $controllerMap;
    }
204560
protected function getControllerActions($type, $id, $module, &$result)
    {
        $token = "Create controller with cofig=" . VarDumper::dumpAsString($type) . " and id='$id'";
        Yii::beginProfile($token, __METHOD__);
        try {
            /* @var $controller \yii\base\Controller */
            $controller = Yii::createObject($type, [$id, $module]);
            $this->getActionRoutes($controller, $result);
            $all = "/{$controller->uniqueId}/*";
            $result[$all] = $all;
        } catch (\Exception $exc) {
            Yii::error($exc->getMessage(), __METHOD__);
        }
        Yii::endProfile($token, __METHOD__);
    }
629466
public function getModuleVersionFromComposer($modules = [])
    {
        $versions = [];
        $lockData = $this->getComposerLock();
        if ($lockData && !empty($lockData['packages'])) {
            foreach ($lockData['packages'] as $package) {
                if (in_array($package['name'], $modules) && isset($package['version'])) {
                    $versions[$package['name']] = $package['version'];
                }
            }
        }
        return $versions;
    }
170090
public function get($module_id)
    {
        $modules = $this->getList();
        return empty($modules[$module_id]) ? array() : $modules[$module_id];
    }
773177
public function getMissingCoreModules()
    {
        $modules = array();

        foreach ($this->coreModules as $module) {
            if (!$this->isLoadedModule($module)) {
                array_push($modules, $module);
            }
        }

        return $modules;
    }
948382
protected function getMyModules()
    {
        $all = array_keys( app()->getLoadedProviders() );
        $modules = [];
        foreach($all as $provider) {
            $parts = explode('\\', $provider);
            if ($parts[0] === 'ErenMustafaOzdal' && array_search($parts[1],$modules) === false) {
                array_push($modules, snake_case($parts[1], '-'));
            }
        }
        return $modules;
    }
37607
public function getControllersModules() : array {
		$result = self::$cached_modules[$this->controller_data['module_code']]['module_ids'];
		// filter
		foreach ($result as $k => $v) {
			// determine action
			$action = $this->method_code == 'Edit' ? 'Record_View' : 'List_View';
			if (!$this->can($action, $this->method_code, $k)) {
				unset($result[$k]);
			}
		}
		// sort
		return \Object\Data\Common::buildOptions($result, ['name' => 'name'], [], ['i18n' => true]);
	}
1197
private function addModuleRules()
	{
		// Load the routes from cache
		$moduleRoutes = array();
		$directories = glob(Yii::getPathOfAlias('application.modules') . '/*' , GLOB_ONLYDIR);

		foreach ($directories as $dir)
		{
			$routePath = $dir .DS. 'config' .DS. 'routes.php';
			if (file_exists($routePath))
			{
				$routes = require_once($routePath);
				// Unit tests are failing here for some reason
				if (!is_array($routes))
					continue;

				foreach ($routes as $k=>$v)
				$moduleRoutes[$k] = $v;
			}
		}

		return $moduleRoutes;
	}
14928
private function validateForControllerKeyDuplication(ModuleSetting $moduleSetting, array $controllerClassMap)
    {
        $duplications = array_intersect_key(
            $this->arrayKeysToLowerCase($moduleSetting->getValue()),
            $controllerClassMap
        );

        if (!empty($duplications)) {
            throw new ControllersDuplicationModuleSettingException(
                'Controller keys duplication: ' . implode(', ', $duplications)
            );
        }
    }
840232
public function getThirdPartyModules()
    {
        $coreModulesByName = $this->getCoreModulesByName();

        $thirdPartyModules = $this->all()->reject(
            function ($module) use ($coreModulesByName) {
                return array_key_exists($module->getLowerName(), $coreModulesByName->toArray());
            });

        return $thirdPartyModules->all();
    }
510830
public function GetSignatureModules($Sesscode, $Platform, $Phase, $Type)
    {
        return $this->__soapCall('GetSignatureModules', array($Sesscode, $Platform, $Phase, $Type));
    }
692621
public function getController($module, $controller=null, $type="controller")
	{
	    if (isset($this->controllers[$module])) {
	        $controller = $this->controllers[$module];
	    } else {
	        $controller = parent::getController($module, $controller, $type);
	        if (!$controller) {
	            throw new \InvalidArgumentException(sprintf('The controller "%s" does not exist.', $module));
	        }
	    }
	    
	    if ($this->needHelps) {
	        $this->needHelps = false;
	        
	        /** @var \Wslim\Console\Controller\HelpController $helpController */
	        $helpController = $this->getController('help');
	        $helpController->setController($controller);
	        
	        return $helpController;
	    }
	    
	    return $controller;
	}
152302
private function getPathsOfAvailableModules()
    {
        $config = Registry::getConfig();
        $modulesRootPath = $config->getModulesDir();
        $modulePaths = $config->getConfigParam('aModulePaths');

        if (!is_dir($modulesRootPath))
            return [];

        if (!is_array($modulePaths))
            return [];

        $fullModulePaths = array_map(function ($modulePath) use ($modulesRootPath) {
            return $modulesRootPath . $modulePath;
        }, array_values($modulePaths));

        return array_filter($fullModulePaths, function ($fullModulePath) {
            return is_dir($fullModulePath);
        });
    }
55146
public function registerModules($modules = [])
    {
        for($i = 0; $i < sizeof($modules); $i++) {
            $moduleName = $modules[$i];

            $module = $this->createNew($moduleName);

            if (!$module instanceof ModuleInterface) {
                throw new InvalidModuleException('The module at position '.($i+1).' is invalid');
            }

            $serviceProvider = $module->getServiceProvider();
            $this->getContainer()->registerServices($serviceProvider);
        }
    }
1299716
protected function getModuleInfo(): array
    {
        if ($this->moduleInfo === null) {
            $this->moduleInfo = $this->package()->getExtra()['module'] ?? [];
        }

        return $this->moduleInfo;
    }