| 7 system.api.php | hook_install_tasks_alter(&$tasks, $install_state) |
| 8 system.api.php | hook_install_tasks_alter(&$tasks, $install_state) |
Alter the full list of installation 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.
Related topics
File
- modules/
system/ system.api.php, line 3732 - Hooks provided by Drupal core and the System module.
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';
}
Login or register to post comments
Comments
For installation profiles ...
Probably the only two tasks that can be altered in an installation profile are:
Install_import_locales_remaining
Imports additional languages into the system if any have not yet been imported.
and
install_finished
Performs final installation tasks (like clearing caches) and informs the user that the installation process is complete.
See more documentation here
Not true
The source code of function install_tasks implies the fact that 'any' core install task after 'install_select_profile' can be altered.