function install_base_system in Drupal 10
Same name and namespace in other branches
- 8 core/includes/install.core.inc \install_base_system()
- 9 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.
1 string reference to 'install_base_system'
- install_tasks in core/
includes/ install.core.inc - Returns a list of all tasks the installer currently knows about.
File
- core/
includes/ install.core.inc, line 1094 - API functions for installing Drupal.
Code
function install_base_system(&$install_state) {
// Install system.module.
drupal_install_system($install_state);
// Call HtaccessWriter::ensure() 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.
\Drupal::service('file.htaccess_writer')
->ensure();
// Prime the module list static cache with the user module's exact location.
// @todo Remove as part of https://www.drupal.org/node/2186491
\Drupal::service('extension.list.module')
->setPathname('user', 'core/modules/user/user.info.yml');
// Install the User module so that installing from configuration works and to
// ensure the anonymous user is created with a langcode of 'en'.
\Drupal::service('module_installer')
->install([
'user',
], FALSE);
$install_state['base_system_verified'] = TRUE;
}