Finds submodules of in the project directory.

@return string[]
161893
private function findGitDirectories() : array
    {
        $finderGit = $this->finderFactory->build();
        $finderGit->in($this->environment->getRootDirectory())->depth('> 0')->path('/.git$/');
        $rawExcludePathsByFileByGit = $this->finderToRealPathConverter->finderToArrayOfPaths($finderGit);
        return array_map('dirname', $rawExcludePathsByFileByGit);
    }
1194898
public function getDocSubPackages()
    {
        $package = self::DOC_SUB_PACKAGE_STRUCTS;
        if ($this->isRestriction()) {
            $package = self::DOC_SUB_PACKAGE_ENUMERATIONS;
        } elseif ($this->isArray()) {
            $package = self::DOC_SUB_PACKAGE_ARRAYS;
        }
        return [
            $package,
        ];
    }
590457
public static function getAvailableModules()
    {
        if (!self::$_initialized) {
            self::init();
        }

        $result = [];

        foreach (self::$_modules as $ns => $module) {
            $result[] = [
                'namespace' => $ns,
                'name' => $module->name(),
                'description' => $module->description(),
                'group' => $module->group(),
                'icon' => $module->icon()
            ];
        }

        return $result;
    }
96697
public static function &getModules($position)
    {
        if($position) {
            $modules =& JModuleHelper::getModules($position);
        } else {
            $modules =& JModuleHelper::_load();
        }

        return $modules;
    }
559152
public function getModuleNames()
    {
        $data = [];
        foreach (Yii::$app->getFrontendModules() as $k => $f) {
            $data[] = ['value' => $k, 'label' => $k];
        }
        return $data;
    }
930858
protected function getModuleConfig(): array
    {
        $merged = [];
        $merger = $this->getMerger();
        foreach ($this->getModules() as $module) {
            if ($module instanceof ConditionProviderInterface && $module->isConditioned() === true) {
                continue;
            }

            if ($module instanceof ConfigProviderInterface) {
                $merged = $merger->merge(
                    $merged,
                    $module->getConfig()->load()
                );
            }
        }

        return $merged;
    }
1142326
def get_app_submodules(submodule_name):
    
    for name, module in get_app_modules():
        if module_has_submodule(module, submodule_name):
            yield name, import_module('%s.%s' % (name, submodule_name))
532172
public function getInstalledModules()
    {
        $modules = $this->modules;

        if ($this->rootModule) {
            unset($modules[$this->rootModule->getName()]);
        }

        return $modules;
    }
1121414
public function getModules($inited=false)
	{
	    if ($inited) {
	        $instances = [];
	        if ($this->_modules) foreach ($this->_modules as $v) {
	            $instances[] = $this->getModule($v);
	        }
	        return $instances;
	    }
	    
		return $this->_modules;
	}
621564
protected function getModules(Repository $repository)
    {
        $modules = $repository->all();
        $results = [];

        foreach ($modules as $module) {
            $results[] = $this->getModuleInformation($repository, $module);
        }

        return array_filter($results);
    }
86691
@Override
    public List<Module> getModules() {
        modules = Lists.createWhenNull(modules);
        if (ModuleUtils.getModule(modules, DCModule.URI) == null) {
            modules.add(new DCModuleImpl());
        }
        return modules;
    }
328863
public function getModuleIds()
    {
        $aModuleIdsFromExtensions = $this->_getModuleIdsFromExtensions($this->getModulesWithExtendedClass());
        $aModuleIdsFromFiles = array_keys($this->getModuleConfigParametersByKey(static::MODULE_KEY_FILES));

        return array_unique(array_merge($aModuleIdsFromExtensions, $aModuleIdsFromFiles));
    }
919575
protected function getModulePaths()
    {
        // Project root is always returned
        $basePath = $this->getProjectPath();
        yield $basePath;

        // Get vendor modules
        $search = Util::joinPaths($basePath, 'vendor', '*', '*');
        foreach (glob($search, GLOB_ONLYDIR) as $modulePath) {
            if ($this->isPathModule($modulePath)) {
                yield $modulePath;
            }
        }

        // Check if public/ folder exists
        $publicExists = is_dir(Util::joinPaths($basePath, Library::PUBLIC_PATH));
        if (!$publicExists) {
            return;
        }

        // Search all base folders / modules
        $search = Util::joinPaths($basePath, '*');
        foreach (glob($search, GLOB_ONLYDIR) as $modulePath) {
            if ($this->isPathModule($modulePath)) {
                yield $modulePath;
            }
        }

        // Check all themes
        $search = Util::joinPaths($basePath, 'themes', '*');
        foreach (glob($search, GLOB_ONLYDIR) as $themePath) {
            yield $themePath;
        }
    }
1192796
public function getPaths($sub = null)
    {
        $paths = [];

        foreach ($this->moduleLoader->getRegisteredModules() as $module) {
            if (is_dir($dir = $module->getPath($sub))) {
                // This path has a file, add it to the list
                $paths[$module->getName()] = $dir;
            }
        }

        return $paths;
    }
791672
public static function getDirectories() {
        Logger::info("Resolving dependencies for project");
        $packages = array();
        $root = dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
        $composer = file_get_contents($root . DIRECTORY_SEPARATOR . 'composer.json');
        $composer = json_decode($composer, true);
        if (array_key_exists('require', $composer) && !empty($composer['require'])) {
            foreach ($composer['require'] as $requirement => $version) {
                $packages = array_merge(self::readFile($requirement), $packages);
            }
        } else {
            Logger::trace("Project has no dependencies");
        }
        foreach ($packages as $package) {
            Logger::debug("Project references package %s", $package);
        }
        Logger::info("%d dependencies found", count($packages));
        return $packages;
    }
827663
public function listModules()
    {
        $uri = 'asterisk/modules';

        $response = $this->client->getEndpoint()->get($uri);

        $modules = [];
        foreach (\GuzzleHttp\json_decode($response->getBody()) as $module) {
            $modules[] = new Module($module);
        }

        return $modules;
    }
284322
def get_submodules(mod):
    """"""
    def catch_exceptions(module):
        pass
    try:
        m = __import__(mod)
        submodules = [mod]
        submods = pkgutil.walk_packages(m.__path__, m.__name__ + '.',
                                        catch_exceptions)
        for sm in submods:
            sm_name = sm[1]
            submodules.append(sm_name)
    except ImportError:
        return []
    except:
        return [mod]
    
    return submodules