function install_load_profile

Same name in other branches
  1. 7.x includes/install.core.inc \install_load_profile()
  2. 9 core/includes/install.core.inc \install_load_profile()
  3. 8.9.x core/includes/install.core.inc \install_load_profile()
  4. 11.x 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.

File

core/includes/install.core.inc, line 1541

Code

function install_load_profile(&$install_state) {
    $profile = $install_state['parameters']['profile'];
    if ($profile !== FALSE) {
        $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');
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.