Parent and Child Tasks in PHP
Contents
[
Hide
Show
]Aspose.Tasks - Getting Parent and Child Tasks
To get Parent and Child Tasks using Aspose.Tasks Java for PHP, call get_parent_and_child_tasks method of ParentAndChildTasks module. Here you can see example code.
PHP Code
1$project = new Project('test_tasks.mpp');
2$collector = new ChildTasksCollector();
3$taskUtils = new TaskUtils();
4$taskUtils->apply($project->getRootTask(), $collector, 0);
5$tsk = new Tsk();
6$tasks = $collector->getTasks();
7$i = 0;
8while ($i < sizeof($tasks))
9{
10 $task = $tasks->get($i);
11 print "Task Name = " . (string)$task->get($tsk->NAME);//.to_string
12 $i += 1;
13}
Download Running Code
Download Parent and Child Tasks (Aspose.Tasks) from any of the below mentioned social coding sites: