You are here

function thunder_module_install in Thunder 8.2

Same name and namespace in other branches
  1. 8.5 thunder.profile \thunder_module_install()
  2. 8.3 thunder.profile \thunder_module_install()
  3. 8.4 thunder.profile \thunder_module_install()
  4. 6.2.x thunder.profile \thunder_module_install()
  5. 6.0.x thunder.profile \thunder_module_install()
  6. 6.1.x thunder.profile \thunder_module_install()

Installs the thunder modules in a batch.

Parameters

array $install_state: The install state.

Return value

array A batch array to execute.

File

./thunder.profile, line 56
Enables modules and site configuration for a thunder site installation.

Code

function thunder_module_install(array &$install_state) {
  $modules = $install_state['thunder_additional_modules'];
  $batch = [];
  if ($modules) {
    $operations = [];
    foreach ($modules as $module) {
      $operations[] = [
        '_thunder_install_module_batch',
        [
          [
            $module,
          ],
          $module,
          $install_state['form_state_values'],
        ],
      ];
    }
    $batch = [
      'operations' => $operations,
      'title' => t('Installing additional modules'),
      'error_message' => t('The installation has encountered an error.'),
    ];
  }
  return $batch;
}