Stop and Resume a Task in PHP
Contents
[
Hide
Show
]Aspose.Tasks - Stop and Resume a Task
To Stop and Resume a Task using Aspose.Tasks Java for PHP, simply invoke StopAndResumeTask 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$tasks = $collector->getTasks();
6$tsk = new Tsk();
7$i = 0;
8while ($i < sizeof($tasks)) {
9 $task = $tasks->get($i);
10 if ((string)$task->get($tsk->STOP) == "1/1/2015")
11 {
12 print "NA";
13 }
14 else
15 {
16 print "Task Stop: " . (string)$task->get($tsk->STOP);
17 }
18 if ((string)$task->get($tsk->RESUME) == "1/1/2015")
19 {
20 print "\nNA";
21 }
22 else
23 {
24 print "\nTask Resume: " . (string)$task->get($tsk->RESUME);
25 }
26 print "\n---------------------------------------------";
27 $i += 1;
28}
Download Running Code
Download Stop and Resume a Task (Aspose.Tasks) from any of the below mentioned social coding sites: