function Settings::getAdminTheme
Same name in this branch
- main core/themes/admin/src/Settings.php \Drupal\admin\Settings::getAdminTheme()
Same name and namespace in other branches
- 11.x core/themes/admin/src/Settings.php \Drupal\admin\Settings::getAdminTheme()
- 11.x core/themes/default_admin/src/Settings.php \Drupal\default_admin\Settings::getAdminTheme()
Return the active administration theme.
Return value
string|null The active administration theme name, or NULL if it cannot be determined. This is the case while Drupal is being installed, because the system theme configuration does not exist yet. The theme settings provider then falls back to the active theme.
4 calls to Settings::getAdminTheme()
- Settings::allowUserOverrides in core/
themes/ default_admin/ src/ Settings.php - Determine if user overrides are allowed.
- Settings::get in core/
themes/ default_admin/ src/ Settings.php - Get the setting for the current user.
- Settings::getDefault in core/
themes/ default_admin/ src/ Settings.php - Get the default setting from theme.
- Settings::overridden in core/
themes/ default_admin/ src/ Settings.php - Check if the user setting overrides the global setting.
File
-
core/
themes/ default_admin/ src/ Settings.php, line 206
Class
- Settings
- Service to handle overridden user settings.
Namespace
Drupal\default_adminCode
private function getAdminTheme() : ?string {
$admin_theme = $this->configFactory
->get('system.theme')
->get('admin');
if (empty($admin_theme)) {
$admin_theme = $this->configFactory
->get('system.theme')
->get('default');
}
return $admin_theme ?: NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.