function hook_install_tasks_alter

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/module.api.php \hook_install_tasks_alter()
  2. 8.9.x core/lib/Drupal/Core/Extension/module.api.php \hook_install_tasks_alter()
  3. 10 core/lib/Drupal/Core/Extension/module.api.php \hook_install_tasks_alter()
  4. 11.x core/lib/Drupal/Core/Extension/module.api.php \hook_install_tasks_alter()

Alter the full list of installation tasks.

This hook is invoked on the install profile in install_tasks().

Parameters

$tasks: An array of all available installation tasks, including those provided by Drupal core. You can modify this array to change or replace any part of the Drupal installation process that occurs after the installation profile is selected.

$install_state: An array of information about the current installation state.

See also

hook_install_tasks()

install_tasks()

Related topics

File

modules/system/system.api.php, line 3944

Code

function hook_install_tasks_alter(&$tasks, $install_state) {
    // Replace the "Choose language" installation task provided by Drupal core
    // with a custom callback function defined by this installation profile.
    $tasks['install_select_locale']['function'] = 'myprofile_locale_selection';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.