function InstallerKernel::getExtensions
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Installer/InstallerKernel.php \Drupal\Core\Installer\InstallerKernel::getExtensions()
Get the core.extension config object.
Return value
array|false The core.extension config object if it exists or FALSE.
Overrides DrupalKernel::getExtensions
File
-
core/
lib/ Drupal/ Core/ Installer/ InstallerKernel.php, line 106
Class
- InstallerKernel
- Extend DrupalKernel to handle force some kernel behaviors.
Namespace
Drupal\Core\InstallerCode
protected function getExtensions() : array {
$extensions = parent::getExtensions() ?: [];
if (!static::installationAttempted()) {
return $extensions;
}
// Ensure that the System module is always available to the installer.
$extensions['module']['system'] ??= 0;
if ($profile = $this->installGetProfile()) {
$extensions['profile'] = $profile->getName();
if (!isset($extensions['module'][$profile->getName()])) {
$extensions['module'][$profile->getName()] = 1000;
}
$theme = $profile->info['distribution']['install']['theme'] ?? 'claro';
$extensions['theme'][$theme] ??= 0;
if ($theme !== 'claro') {
// Need to check for base themes.
foreach ($this->getBaseThemes($profile, $theme) as $base_theme) {
$extensions['theme'][$base_theme] ??= 0;
}
}
}
else {
$extensions['theme']['claro'] ??= 0;
}
return $extensions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.