function install_load_profile

Same name in other branches
  1. 9 core/includes/install.core.inc \install_load_profile()
  2. 8.9.x core/includes/install.core.inc \install_load_profile()
  3. 10 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, or an exception will be thrown if the profile cannot be loaded.

File

includes/install.core.inc, line 1377

Code

function install_load_profile(&$install_state) {
    $profile_file = DRUPAL_ROOT . '/profiles/' . $install_state['parameters']['profile'] . '/' . $install_state['parameters']['profile'] . '.profile';
    if (file_exists($profile_file)) {
        include_once $profile_file;
        $install_state['profile_info'] = install_profile_info($install_state['parameters']['profile'], $install_state['parameters']['locale']);
    }
    else {
        throw new Exception(st('Sorry, the profile you have chosen cannot be loaded.'));
    }
}

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