foreach ($extensions as $extension) { $this->
ensureRequiredDependencies($extension,
$extensions);
} // Add status, weight, and schema version.
$installed_modules =
$this->configFactory->
get('core.extension'
)->
get('module'
) ?:
[];
foreach ($extensions as $name =>
$module) { $module->weight =
$installed_modules[$name] ?? 0;
$module->status =
(int) isset($installed_modules[$name]);
$module->schema_version = UpdateHookRegistry::SCHEMA_UNINSTALLED;
} $extensions =
$this->moduleHandler->
buildModuleDependencies($extensions);
if ($this->installProfile &&
$extensions[$this->installProfile
]) { $active_profile =
$extensions[$this->installProfile
];
// Installation profile hooks are always executed last.
$active_profile->weight = 1000;
// Installation profiles are hidden by default, unless explicitly
// specified otherwise in the .info.yml file.
if (!
isset($active_profile->info
['hidden'
])) { $active_profile->info
['hidden'
] = TRUE;
}