function hosting_task_hosting_tasks_alter in Hosting 7.4
Same name and namespace in other branches
- 7.3 task/hosting_task.module \hosting_task_hosting_tasks_alter()
Implements hook_hosting_tasks_alter()
Set 'command' property for tasks that don't implement it.
File
- task/
hosting_task.module, line 905 - Web server node type is defined here.
Code
function hosting_task_hosting_tasks_alter(&$cache) {
// For any task type that doesn't use "command", add it as 'provision-$TYPE'.
foreach ($cache as &$tasks) {
foreach ($tasks as $type => &$task_type) {
if (!isset($task_type['command']) || empty($task_type['command'])) {
$task_type['command'] = 'provision-' . $type;
}
}
}
}