Sets system required modules

@return array
329309
public function getRequiredModules()
    {
        if ($this->_aRequiredModules == null) {
            $aRequiredPHPExtensions = [
                'php_xml',
                'j_son',
                'i_conv',
                'tokenizer',
                'mysql_connect',
                'gd_info',
                'mb_string',
                'curl',
                'bc_math',
                'open_ssl',
                'soap',
            ];

            $aRequiredPHPConfigs = [
                'allow_url_fopen',
                'request_uri',
                'ini_set',
                'memory_limit',
                'unicode_support',
                'file_uploads',
                'session_autostart',
            ];

            $aRequiredServerConfigs = [
                'php_version',
                'mod_rewrite',
                'server_permissions'
            ];

            if ($this->isAdmin()) {
                $aRequiredServerConfigs[] = 'mysql_version';
            }
            $this->_aRequiredModules = array_fill_keys($aRequiredServerConfigs, 'server_config') +
                                       array_fill_keys($aRequiredPHPConfigs, 'php_config') +
                                       array_fill_keys($aRequiredPHPExtensions, 'php_extennsions')
                                       ;
        }

        return $this->_aRequiredModules;
    }
33598
public static function modules($status = 'installed') {
        switch ($status) {
            case 'uninstalled':
                $modules = array_filter(self::$modules, function (Module $m) {
                    return !$m->installed;
                });
                break;
            case 'installed':
                $modules = array_filter(self::$modules, function (Module $m) {
                    return $m->installed;
                });
                break;
            case 'enabled':
                $modules = array_filter(self::$modules, function (Module $m) {
                    return $m->enabled;
                });
                break;
            case 'disabled':
                $modules = array_filter(self::$modules, function (Module $m) {
                    return !$m->enabled && $m->installed;
                });
                break;
            case 'upgradable':
                $modules = array_filter(self::$modules, function (Module $m) {
                    return $m->upgradable && $m->installed;
                });
                break;
            default:
                $modules = self::$modules;
                break;
        }

        return $modules;
    }
436740
private function coreModules(): Collection
    {
        return Collection::make(self::CORE_MODULES)
            ->map(static function (string $class, string $name): ModuleInterface {
                $module = app($class);

                $module->setName($name);

                return $module;
            });
    }
800064
protected function getModules()
    {
    	$file = json_decode( file_get_contents( $this->packagist . 'packages.json' ) )->includes;
    	$file = json_decode( file_get_contents( $this->packagist . key( $file ) ) );
    	return $this->normaliseData( $file->packages );
    }
1229716
public function includeModules()
    {
        if (!is_array($this->needModules) || empty($this->needModules))
        {
            return false;
        }

        foreach ($this->needModules as $module)
        {
            if (!Main\Loader::includeModule($module))
            {
                throw new Main\LoaderException('Failed include module "'.$module.'"');
            }
        }
    }
701901
public function getModulesForSelect()
    {
        $modules = config('typicms.modules');
        $options = ['' => ''];
        foreach ($modules as $module => $properties) {
            if (in_array('linkable_to_page', $properties)) {
                $options[$module] = __(ucfirst($module));
            }
        }
        asort($options);

        return $options;
    }
670620
public function findForActiveModules()
    {
        $fs = new Filesystem();

        $codes = $this->queryActiveModuleCodes();

        foreach ($codes as $key => $code) {
            // test if the module exists on the file system
            if (!$fs->exists(THELIA_MODULE_DIR . $code)) {
                unset($codes[$key]);
            }
        }

        // reset keys
        $codes = array_values($codes);

        return $this->findForModules($codes);
    }
1374990
public function enableModules($modules)
    {
        foreach ($modules as $moduleToEnable => $value) {
            $module = $this->module->get($moduleToEnable);
            $module->enable();
        }
    }
660416
public function modules()
    {
        $modules = new Collection;

        // Make meta module
        $modules->push(
            $this->makeMetaModuleInstance()
        );

        // Make model modules
        foreach ($this->repository->getAll() as $modelInformation) {
            $modules->push(
                $this->makeModuleInstance($modelInformation)
            );
        }

        return $modules;
    }
1161404
private function loadModules()
    {
        /** @var ModuleRepository $repo */
        $repo = $this->getContainer()->get('module_repository');

        /** @var Module $module */
        foreach ($repo->getAll() as $module) {
            $moduleClass = $module->getClass();
            new $moduleClass($this);
        }
    }
742369
protected function bootModuleComponents()
    {
        foreach ($this->app['modules']->enabled() as $module) {
            if ($this->moduleHasBlocks($module)) {
                $this->bootModuleBlocks($module);
            }
        }
    }
14038
public function getModules(){
		$modules=array();
		$db=BFactory::getDBO();
		if(empty($db)){
			return $modules; //False?
			}
		$qr='SELECT * from `soft_modules_rules` where pageid='.$this->id;
		$q=$db->Query($qr);
		if(empty($q)){
			return $modules; //False?
			}
		while($l=$db->fetch($q)){
			$id=(int)$l['id'];
			$modules[$id]=new BSoftModule();
			$modules[$id]->group=$this;
			$modules[$id]->load($l);
			}
		return $modules;
		}
1130524
public function getCoreModules()
    {
        $coreModulesByName = $this->getCoreModulesByName();

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

        return $coreModules->all();
    }
1257574
public function setupLanguages(): Collection
    {
        return $this->coreModules()
            ->filter(static function (ModuleInterface $module) {
                return $module instanceof ModuleLanguageInterface && $module->isEnabledByDefault();
            })
            ->sort(static function (ModuleLanguageInterface $x, ModuleLanguageInterface $y) {
                return $x->locale()->endonymSortable() <=> $y->locale()->endonymSortable();
            });
    }
537490
public static function initModules() {
        $cfg = ServiceContainer::get('config');
        $moduleList = $cfg->getConfigData('modules');
        if (count($moduleList) > 0) {
            foreach ($moduleList as $moduleName) {
                self::loadModule($moduleName);
            }
        }
    }
405710
public function all()
    {
        $modules = new Collection($this->module->all());

        foreach ($modules as $module) {
            $module = $this->get($module);
        }

        return $modules;
    }
1348398
protected function getSiteModules() : array
    {
        $modules    = [];
        $modulePath = $_SERVER['DOCUMENT_ROOT'] . '/../module/MelisSites';

        if (is_dir($modulePath)){
            foreach (scandir($modulePath) as $module) {
                // Skip directory pointers
                if ($module == '.' || $module == '..') continue;

                if (is_dir($modulePath . '/' . $module)) {
                    $modules[$module] = $this->getControllers($modulePath . '/' . $module . '/src/' . $module . '/Controller');
                }
            }
        }

        return $modules;
    }