function install_get_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
array The tasks.
1 call to install_get_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 2676
Code
function install_get_tasks(Extension $extension, array &$install_state) : array {
assert($extension->getType() === 'profile');
$class_name = install_get_fixed_class_name($extension, 'Install/Tasks');
$install_tasks = [];
if (class_exists($class_name) && is_subclass_of($class_name, TasksInterface::class)) {
$tasks_class = \Drupal::classResolver($class_name);
assert($tasks_class instanceof TasksInterface);
$install_tasks = $tasks_class->getTasks($install_state);
}
return $install_tasks;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.