Predecessor and Successor Tasks in PHP

Aspose.Tasks - Predecessor and Successor Tasks

To get Predecessor and Successor Tasks using Aspose.Tasks Java for PHP, simply invoke PredecessorAndSuccessorTask module. Here you can see example code.

PHP Code

 1$project = new Project('test_tasks.mpp');
 2
 3$tsk = new Tsk();
 4
 5$allLinks = $project->getTaskLinks()->toList();
 6
 7$i = 0;
 8
 9while ($i < sizeof($allLinks)) {
10
11    $tskLink = $allLinks -> get($i);
12
13    print "Predecessor " . (string)$tskLink -> getPredTask() -> get($tsk-> NAME);
14
15    print "\nSuccessor " . (string)$tskLink -> getSuccTask() -> get($tsk -> NAME);
16
17    print "\n------------------------------------------------------";
18
19    $i += 1;
20
21}

Download Running Code

Download Predecessor and Successor Tasks (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.