function page_manager_get_default_task_handlers

Get the default task handlers from a task, if they exist.

Tasks can contain 'default' task handlers which are provided by the default task. Because these can come from either the task or the subtask, the logic is abstracted to reduce code duplication.

2 calls to page_manager_get_default_task_handlers()
page_manager_load_task_handler in page_manager/page_manager.module
Load a single task handler by name.
page_manager_load_task_handlers in page_manager/page_manager.module
Load all task handlers for a given task/subtask.

File

page_manager/page_manager.module, line 574

Code

function page_manager_get_default_task_handlers($task, $subtask_id) {
    // Load default handlers that are provied by the task/subtask itself.
    $handlers = array();
    if ($subtask_id) {
        $subtask = page_manager_get_task_subtask($task, $subtask_id);
        if (isset($subtask['default handlers'])) {
            $handlers = $subtask['default handlers'];
        }
    }
    elseif (isset($task['default handlers'])) {
        $handlers = $task['default handlers'];
    }
    return $handlers;
}