8.2.x install.core.inc install_select_profile(&$install_state)
8.0.x install.core.inc install_select_profile(&$install_state)
8.1.x install.core.inc install_select_profile(&$install_state)
8.3.x install.core.inc install_select_profile(&$install_state)
5.x install.php install_select_profile()
6.x install.php install_select_profile()
7.x install.core.inc install_select_profile(&$install_state)

Selects which profile to install.


$install_state: An array of information about the current installation state. The chosen profile will be added here, if it was not already selected previously, as will a list of all available profiles.

Return value

For interactive installations, a form allowing the profile to be selected, if the user has a choice that needs to be made. Otherwise, an exception is thrown if a profile cannot be chosen automatically.

1 string reference to 'install_select_profile'
install_tasks in includes/install.core.inc
Returns a list of all tasks the installer currently knows about.


includes/install.core.inc, line 1052
API functions for installing Drupal.


function install_select_profile(&$install_state) {
  $install_state['profiles'] += install_find_profiles();
  if (empty($install_state['parameters']['profile'])) {
    // Try to find a profile.
    $profile = _install_select_profile($install_state['profiles']);
    if (empty($profile)) {
      // We still don't have a profile, so display a form for selecting one.
      // Only do this in the case of interactive installations, since this is
      // not a real form with submit handlers (the database isn't even set up
      // yet), rather just a convenience method for setting parameters in the
      // URL.
      if ($install_state['interactive']) {
        include_once DRUPAL_ROOT . '/includes/form.inc';
        drupal_set_title(st('Select an installation profile'));
        $form = drupal_get_form('install_select_profile_form', $install_state['profiles']);
        return drupal_render($form);
      else {
        throw new Exception(install_no_profile_error());
    else {
      $install_state['parameters']['profile'] = $profile;