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$tsk = new Tsk();
 3$allLinks = $project->getTaskLinks()->toList();
 4$i = 0;
 5while ($i < sizeof($allLinks)) {
 6    $tskLink = $allLinks -> get($i);
 7    print "Predecessor " . (string)$tskLink -> getPredTask() -> get($tsk-> NAME);
 8    print "\nSuccessor " . (string)$tskLink -> getSuccTask() -> get($tsk -> NAME);
 9    print "\n------------------------------------------------------";
10    $i += 1;
11}

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.