function _views_gantt_task_path in Views Gantt 7
Helper for _views_gantt_prepare_tasks().
Parameters
array $task_id: Id of task (nid)
array $tasks: Array of tasks
array $relations: Array of every task Id => parent Id of this task
array $path: Array of tasks Ids
Return value
array Array of tasks Ids
1 call to _views_gantt_task_path()
- _views_gantt_prepare_tasks in ./
views_gantt.module - Modifies tasks array. Subtasks go to 'childtasks' item of parent task array.
File
- ./
views_gantt.module, line 313 - Module file for Views Gantt
Code
function _views_gantt_task_path($task_id, $tasks, $relations, $path = array()) {
$path[] = 'childtasks';
$path[] = $task_id;
if (!isset($tasks[$task_id]) && isset($relations[$task_id])) {
$parent_id = $relations[$task_id];
$path = _views_gantt_task_path($parent_id, $tasks, $relations, $path);
}
return $path;
}