You are here

function config_installer_install_tasks_alter in Configuration installer 8

Implements hook_install_tasks_alter().

File

./config_installer.profile, line 25
Enables modules and site configuration for a minimal site installation.

Code

function config_installer_install_tasks_alter(&$tasks, $install_state) {
  unset($tasks['install_download_translation']);
  $key = array_search('install_profile_modules', array_keys($tasks), TRUE);
  unset($tasks['install_profile_modules']);
  unset($tasks['install_profile_themes']);
  unset($tasks['install_install_profile']);
  $config_tasks = [
    'config_installer_upload' => [
      'display_name' => t('Upload config'),
      'type' => 'form',
      'function' => 'Drupal\\config_installer\\Form\\SyncConfigureForm',
    ],
    'config_install_batch' => [
      'display_name' => t('Install configuration'),
      'type' => 'batch',
    ],
    'config_download_translations' => [],
    'config_installer_fix_profile' => [],
  ];
  $tasks = array_slice($tasks, 0, $key, true) + $config_tasks + array_slice($tasks, $key, NULL, true);
  $tasks['install_configure_form']['function'] = 'Drupal\\config_installer\\Form\\SiteConfigureForm';
}