ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 {
28 case 'assignUsersToEmployeeRole':
29 case 'assignUsersToSuperiorRole':
30 case 'deassignUserFromEmployeeRole':
31 case 'deassignUserFromSuperiorRole':
32 case 'assignUserToLocalRole':
33 case 'deassignUserFromLocalRole':
34 $this->extractWithUser($parameters);
35 break;
36 case 'initDefaultRoles':
37 case 'delete':
38 $this->extractWithoutUser($parameters);
39 }
40
42 }
43
47 protected function extractWithUser($parameters)
48 {
49
50 $this->ilExtractedParams->setSubjectId($parameters['obj_id']);
51 $this->ilExtractedParams->setContextType('usr_id');
52 $this->ilExtractedParams->setContextId($parameters['user_id']); // usr_id in many other places
53 }
54}
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
extractWithoutUser($parameters)
Class ilExtractedParams.
@noinspection PhpIncludeInspection