function install_profile_themes in Drupal 10
Same name and namespace in other branches
- 8 core/includes/install.core.inc \install_profile_themes()
- 9 core/includes/install.core.inc \install_profile_themes()
Installs themes.
This does not use a batch, since installing themes is faster than modules and because an installation profile typically installs 1-3 themes only (default theme, base theme, admin theme).
Parameters
$install_state: An array of information about the current installation state.
1 string reference to 'install_profile_themes'
- install_tasks in core/
includes/ install.core.inc - Returns a list of all tasks the installer currently knows about.
File
- core/
includes/ install.core.inc, line 1631 - API functions for installing Drupal.
Code
function install_profile_themes(&$install_state) {
// Install the themes specified by the installation profile.
$themes = $install_state['profile_info']['themes'];
\Drupal::service('theme_installer')
->install($themes);
// Ensure that the install profile's theme is used.
// @see _drupal_maintenance_theme()
\Drupal::theme()
->resetActiveTheme();
}