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
3$collector = new ChildTasksCollector();
4
5$taskUtils = new TaskUtils();
6
7$taskUtils->apply($project->getRootTask(), $collector, 0);
8
9$tasks = $collector->getTasks();
10
11$tsk = new Tsk();
12
13$i = 0;
14
15while ($i < sizeof($tasks)) {
16
17 $task = $tasks->get($i);
18
19 if ((string)$task->get($tsk->STOP) == "1/1/2015")
20
21 {
22
23 print "NA";
24
25 }
26
27 else
28
29 {
30
31 print "Task Stop: " . (string)$task->get($tsk->STOP);
32
33 }
34
35 if ((string)$task->get($tsk->RESUME) == "1/1/2015")
36
37 {
38
39 print "\nNA";
40
41 }
42
43 else
44
45 {
46
47 print "\nTask Resume: " . (string)$task->get($tsk->RESUME);
48
49 }
50
51 print "\n---------------------------------------------";
52
53 $i += 1;
54
55}
Download Running Code
Download Stop and Resume a Task (Aspose.Tasks) from any of the below mentioned social coding sites: