function hosting_task_action_info in Hosting 7.4
Same name and namespace in other branches
- 7.3 task/hosting_task.module \hosting_task_action_info()
Implements hook_action_info().
File
- task/
hosting_task.module, line 920 - Web server node type is defined here.
Code
function hosting_task_action_info() {
$available_tasks = hosting_available_tasks();
$actions = array();
foreach ($available_tasks as $module => $tasks) {
foreach ($tasks as $task => $task_info) {
// Search for dashes an replace accordingly.
$task = str_replace('-', '_', $task);
$function = 'hosting_' . $module . '_' . $task . '_action';
if (function_exists($function)) {
$label = ucwords($module . ': ' . $task);
$actions[$function] = array(
'type' => 'node',
'label' => t($label),
'configurable' => FALSE,
'behavior' => array(
'none',
),
);
}
}
}
return $actions;
}