You are here

function install_base_system in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/install.core.inc \install_base_system()

Installation task; install the base functionality Drupal needs to bootstrap.

Parameters

$install_state: An array of information about the current installation state.

File

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

Code

function install_base_system(&$install_state) {

  // Install system.module.
  drupal_install_system($install_state);

  // Call file_ensure_htaccess() to ensure that all of Drupal's standard
  // directories (e.g., the public files directory and config directory) have
  // appropriate .htaccess files. These directories will have already been
  // created by this point in the installer, since Drupal creates them during
  // the install_verify_requirements() task. Note that we cannot call
  // file_ensure_access() any earlier than this, since it relies on
  // system.module in order to work.
  file_ensure_htaccess();

  // Prime the drupal_get_filename() static cache with the user module's
  // exact location.
  // @todo Remove as part of https://www.drupal.org/node/2186491
  drupal_get_filename('module', 'user', 'core/modules/user/user.info.yml');

  // Enable the user module so that sessions can be recorded during the
  // upcoming bootstrap step.
  \Drupal::service('module_installer')
    ->install(array(
    'user',
  ), FALSE);

  // Save the list of other modules to install for the upcoming tasks.
  // State can be set to the database now that system.module is installed.
  $modules = $install_state['profile_info']['dependencies'];
  \Drupal::state()
    ->set('install_profile_modules', array_diff($modules, array(
    'system',
  )));
  $install_state['base_system_verified'] = TRUE;
}