ILIAS  release_7 Revision v7.30-3-g800a261c036
UserIdsOfPosition.php
Go to the documentation of this file.
1<?php
2
4
6
13{
14
20 protected function run(array $params)
21 {
22 $position_id = $params[self::POSITION_ID];
23
24 // $record = ilOrgUnitPosition::find($position_id);
25
26 $usr_ids = [];
27 foreach (ilOrgUnitUserAssignmentQueries::getInstance()->getUserAssignmentsOfPosition($position_id) as $assignment) {
28 $usr_ids[] = $assignment->getUserId();
29 }
30
31 return $usr_ids;
32 }
33
34
38 public function getName()
39 {
40 return "getUserIdsOfPosition";
41 }
42
43
47 protected function getAdditionalInputParams()
48 {
49 return array(self::POSITION_ID => Base::TYPE_INT);
50 }
51
52
56 public function getOutputParams()
57 {
58 return array(self::USR_IDS => Base::TYPE_INT_ARRAY);
59 }
60
61
65 public function getDocumentation()
66 {
67 return "Returns ids of users in a position";
68 }
69}
An exception for terminatinating execution or to throw for unit testing.
getDocumentation()
Get the documentation of this method.string
getOutputParams()
Get the output parameters in the same format as the input parameters.array
Class ilOrgUnitUserAssignmentQueries.