W3cubDocs

/Drupal 8

function hook_install_tasks_alter

hook_install_tasks_alter(&$tasks, $install_state)

Alter the full list of installation tasks.

You can use this hook to change or replace any part of the Drupal installation process that occurs after the installation profile is selected.

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 individual steps within the installation process.

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

See also

hook_install_tasks()

install_tasks()

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

core/lib/Drupal/Core/Extension/module.api.php, line 476
Hooks related to module and update systems.

Code

function hook_install_tasks_alter(&$tasks, $install_state) {
  // Replace the entire site configuration form provided by Drupal core
  // with a custom callback function defined by this installation profile.
  $tasks['install_configure_form']['function'] = 'myprofile_install_configure_form';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Extension!module.api.php/function/hook_install_tasks_alter/8.1.x