function install_alter_tasks
Checks a profile for install tasks.
See \Drupal\Core\Extension\Install\TasksInterface for more information.
@internal
Parameters
\Drupal\Core\Extension\Extension $extension: The extension to check install tasks for.
array $install_state: An array of information about the current installation state.
Return value
bool Whether tasks were altered.
1 call to install_alter_tasks()
- install_tasks in core/
includes/ install.core.inc - Returns a list of all tasks the installer currently knows about.
File
-
core/
includes/ install.core.inc, line 2703
Code
function install_alter_tasks(Extension $extension, array &$tasks, array $install_state) : bool {
assert($extension->getType() === 'profile');
$class_name = install_get_fixed_class_name($extension, 'Install/Tasks');
$tasks_altered = FALSE;
if (class_exists($class_name) && is_subclass_of($class_name, TasksInterface::class)) {
$tasks_altered = TRUE;
$tasks_class = \Drupal::classResolver($class_name);
assert($tasks_class instanceof TasksInterface);
$tasks_class->alter($tasks, $install_state);
}
return $tasks_altered;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.