Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function display_children($parentID, $level) {
- // get tasks at this level..
- $task = new Task();
- $task->include_related('tasktype', array('id', 'title', 'controller', 'colour'), TRUE, TRUE);
- $task->include_related('flag', array('id', 'title', 'iconFile', 'colour'), TRUE, TRUE);
- $task->where(id, $parentID);
- $task->get();
- //$task is a object
- // save the path in this array
- $path = array();
- // see if this task has any children...
- $taskChildCheck = new Task();
- $taskChildCheck->where('parentTaskID', $taskID);
- $taskChildCheck->get();
- if($taskChildCheck->count())
- {
- // has children
- echo 'I have children!';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement