function drupal_install_system

Installs the system module.

Separated from the installation of other modules so core system functions can be made available while other modules are installed.

1 call to drupal_install_system()
install_base_system in drupal/core/includes/install.core.inc
Installation task; install the base functionality Drupal needs to bootstrap.

File

drupal/core/includes/install.inc, line 618
API functions for installing modules and themes.

Code

function drupal_install_system() {

  // Create tables.
  drupal_install_schema('system');
  if (!drupal_container()
    ->has('kernel')) {

    // Immediately boot a kernel to have real services ready.
    $kernel = new DrupalKernel('install', FALSE, drupal_classloader(), FALSE);
    $kernel
      ->boot();
  }
  $system_path = drupal_get_path('module', 'system');
  require_once DRUPAL_ROOT . '/' . $system_path . '/system.install';
  $system_versions = drupal_get_schema_versions('system');
  $system_version = $system_versions ? max($system_versions) : SCHEMA_INSTALLED;
  Drupal::keyValue('system.schema')
    ->set('system', $system_version);

  // System module needs to be enabled and the system/module lists need to be
  // reset first in order to allow config_install_default_config() to invoke
  // config import callbacks.
  // @todo Installation profiles may override the system.module config object.
  config('system.module')
    ->set('enabled.system', 0)
    ->save();

  // Update the module list to include it.
  Drupal::moduleHandler()
    ->setModuleList(array(
    'system' => $system_path . '/system.module',
  ));
  config_install_default_config('module', 'system');
  module_invoke('system', 'install');
}