You are here

function _install_module_batch in Drupal 9

Same name and namespace in other branches
  1. 8 core/includes/install.core.inc \_install_module_batch()
  2. 6 install.php \_install_module_batch()
  3. 7 includes/install.core.inc \_install_module_batch()

Implements callback_batch_operation().

Performs batch installation of modules.

1 string reference to '_install_module_batch'
install_profile_modules in core/includes/install.core.inc
Installs required modules via a batch process.

File

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

Code

function _install_module_batch($module, $module_name, &$context) {
  \Drupal::service('module_installer')
    ->install([
    $module,
  ], FALSE);
  $context['results'][] = $module;
  $context['message'] = t('Installed %module module.', [
    '%module' => $module_name,
  ]);
}