function install_load_profile in Drupal 10
Same name and namespace in other branches
- 8 core/includes/install.core.inc \install_load_profile()
- 7 includes/install.core.inc \install_load_profile()
- 9 core/includes/install.core.inc \install_load_profile()
Loads information about the chosen profile during installation.
Parameters
$install_state: An array of information about the current installation state. The loaded profile information will be added here.
1 call to install_load_profile()
- install_begin_request in core/
includes/ install.core.inc - Begins an installation request, modifying the installation state as needed.
1 string reference to 'install_load_profile'
- 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 1523 - API functions for installing Drupal.
Code
function install_load_profile(&$install_state) {
$profile = $install_state['parameters']['profile'];
$install_state['profiles'][$profile]
->load();
$install_state['profile_info'] = install_profile_info($profile, $install_state['parameters']['langcode'] ?? 'en');
$sync_directory = Settings::get('config_sync_directory');
if (!empty($install_state['parameters']['existing_config']) && !empty($sync_directory)) {
$install_state['config_install_path'] = $sync_directory;
}
elseif (!empty($install_state['profile_info']['config_install_path'])) {
$install_state['config_install_path'] = $install_state['profile_info']['config_install_path'];
}
if (!empty($install_state['config_install_path'])) {
$sync = new FileStorage($install_state['config_install_path']);
$install_state['config']['system.site'] = $sync
->read('system.site');
}
}