getModuleOrder() public method

If modules contain path mappings for the same resource paths, this setting can be used to specify in which order these modules should be loaded. Alternatively, you can use {@link setOverriddenModules()} to mark one of the modules to override the other one.
public getModuleOrder ( ) : string[]
return string[] A list of module names.
コード例 #1
0
 protected function addRootModuleFileToJson(RootModuleFile $moduleFile, stdClass $jsonData)
 {
     $moduleOrder = $moduleFile->getModuleOrder();
     $installInfos = $moduleFile->getInstallInfos();
     // Pass false to exclude base configuration values
     $configValues = $moduleFile->getConfig()->toRawArray(false);
     if (count($moduleOrder) > 0) {
         $jsonData->order = $moduleOrder;
     }
     if (count($configValues) > 0) {
         $jsonData->config = (object) $configValues;
     }
     if (array() !== $moduleFile->getPluginClasses()) {
         $jsonData->plugins = $moduleFile->getPluginClasses();
         sort($jsonData->plugins);
     }
     if (count($installInfos) > 0) {
         $modulesData = array();
         foreach ($installInfos as $installInfo) {
             $installData = new stdClass();
             $installData->{'install-path'} = $installInfo->getInstallPath();
             if (InstallInfo::DEFAULT_INSTALLER_NAME !== $installInfo->getInstallerName()) {
                 $installData->installer = $installInfo->getInstallerName();
             }
             if ($installInfo->hasDisabledBindingUuids()) {
                 $installData->{'disabled-bindings'} = array();
                 foreach ($installInfo->getDisabledBindingUuids() as $uuid) {
                     $installData->{'disabled-bindings'}[] = $uuid->toString();
                 }
                 sort($installData->{'disabled-bindings'});
             }
             if (Environment::PROD !== $installInfo->getEnvironment()) {
                 $installData->env = $installInfo->getEnvironment();
             }
             $modulesData[$installInfo->getModuleName()] = $installData;
         }
         ksort($modulesData);
         $jsonData->modules = (object) $modulesData;
     }
 }