ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilModulesOrgUnitExtractor.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
5require_once './Services/WorkflowEngine/classes/extractors/class.ilBaseExtractor.php';
6
15{
22 public function extract($event, $parameters)
23 {
24 $this->ilExtractedParams->setSubjectType('orgunit');
25
26 switch ($event) {
27 case 'assignUsersToEmployeeRole':
28 case 'assignUsersToSuperiorRole':
29 case 'deassignUserFromEmployeeRole':
30 case 'deassignUserFromSuperiorRole':
31 case 'assignUserToLocalRole':
32 case 'deassignUserFromLocalRole':
33 $this->extractWithUser($parameters);
34 break;
35 case 'initDefaultRoles':
36 case 'delete':
37 $this->extractWithoutUser($parameters);
38 }
39
41 }
42
46 protected function extractWithUser($parameters)
47 {
48 $this->ilExtractedParams->setSubjectId($parameters['obj_id']);
49 $this->ilExtractedParams->setContextType('usr_id');
50 $this->ilExtractedParams->setContextId($parameters['user_id']); // usr_id in many other places
51 }
52}
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
extractWithoutUser($parameters)
Class ilExtractedParams.
@noinspection PhpIncludeInspection