General Resource Assignment Properties in PHP
Contents
[
Hide
Show
]Aspose.Tasks - Getting General Resource Assignment Properties
To get General Resource Assignment Properties using Aspose.Tasks Java for PHP, call get_resource_assignments method of ResourceAssignmentProperties module. Here you can see example code.
1$project = new Project('test_tasks.mpp');
2$resource_assignments = $project->getResourceAssignments()->toList();
3$i = 0;
4while ($i < sizeof($resource_assignments))
5{
6 $assignment = $resource_assignments->get($i);
7 $asn = new Asn();
8 print $assignment->get($asn->UID)."\n";
9 print $assignment->get($asn->START)."\n";
10 print $assignment->get($asn->FINISH)."\n";
11 print "\n--------------------------------------------------------";
12 $i += 1;
13}
Aspose.Tasks - Setting General Resource Assignment Properties
To set general Resource Assignment Properties using Aspose.Tasks Java for PHP, call set_resource_assignments method of ResourceAssignmentProperties module. Here you can see example code.
PHP Code
1$project = new Project();
2$task = $project->getRootTask()->getChildren()->add("Task");
3$rsc = $project->getResources()->add("Rsc");
4$resource = new Rsc();
5$bigDecimal = new BigDecimal();
6$rsc->set($resource->STANDARD_RATE, $bigDecimal->valueOf(10));
7$rsc->set($resource->OVERTIME_RATE, $bigDecimal->valueOf(15));
8$assignment = $project->getResourceAssignments()->add($task, $rsc);
9print "Set resource assignment properties.";
Download Running Code
Download General Resource Assignment Properties (Aspose.Tasks) from any of the below mentioned social coding sites: