ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilOrgUnitUserAssignment Class Reference

Class ilOrgUnitUserAssignment. More...

+ Inheritance diagram for ilOrgUnitUserAssignment:
+ Collaboration diagram for ilOrgUnitUserAssignment:

Public Member Functions

 create ()
 
 delete ()
 
 getId ()
 
 setId (?int $id)
 
 getUserId ()
 
 setUserId (int $user_id)
 
 getPositionId ()
 
 setPositionId (int $position_id)
 
 getOrguId ()
 
 setOrguId (int $orgu_id)
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 Return the Name of your Connector Table More...
 
 setConnectorContainerName (string $connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0)
 
 storeObjectToCache ()
 
 asStdClass ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy (int $new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 
static findOrCreateAssignment (int $user_id, int $position_id, int $orgu_id)
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField (string $old_name, string $new_name)
 
static tableExists ()
 
static fieldExists (string $field_name)
 
static removeDBField (string $field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 never use in ILIAS Core, Plugins only More...
 
static preloadObjects ()
 
static additionalParams (array $additional_params)
 
static findOrFail ($primary_key, array $add_constructor_args=array())
 Tries to find the object and throws an Exception if object is not found, instead of returning null. More...
 
static findOrGetInstance ($primary_key, array $add_constructor_args=array())
 
static where ($where, $operator=null)
 
static innerjoinAR (ActiveRecord $ar, $on_this, $on_external, array $fields=array(' *'), string $operator='=', $both_external=false)
 
static innerjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static leftjoin ( $tablename, $on_this, $on_external, array $fields=array(' *'), string $operator='=', bool $both_external=false)
 
static orderBy ($orderBy, string $orderDirection='ASC')
 
static dateFormat (string $date_format='d.m.Y - H:i:s')
 
static limit ($start, $end)
 
static affectedRows ()
 
static count ()
 
static get ()
 
static debug ()
 
static first ()
 
static getCollection ()
 
static last ()
 
static getFirstFromLastQuery ()
 
static connector (arConnector $connector)
 
static raw (bool $set_raw=true)
 
static getArray (?string $key=null, $values=null)
 
static _toCamelCase (string $str, bool $capitalise_first_char=false)
 

Protected Member Functions

 raiseEvent (string $event)
 
- Protected Member Functions inherited from ActiveRecord
 installDatabase ()
 

Protected Attributes

int $id = 0
 
int $user_id = 0
 
int $position_id = 0
 
int $orgu_id = 0
 
- Protected Attributes inherited from ActiveRecord
bool $ar_safe_read = true
 
string $connector_container_name = ''
 
bool $is_new = true
 

Additional Inherited Members

- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 Returns an instance of the instatiated calling active record (needs to be done in static methods) : This should be cached somehow More...
 
static fromCamelCase (string $str)
 

Detailed Description

Member Function Documentation

◆ create()

ilOrgUnitUserAssignment::create ( )

Definition at line 97 of file class.ilOrgUnitUserAssignment.php.

References raiseEvent().

97  : void
98  {
99  $this->raiseEvent('assignUserToPosition');
100  parent::create();
101  }
+ Here is the call graph for this function:

◆ delete()

ilOrgUnitUserAssignment::delete ( )

Definition at line 103 of file class.ilOrgUnitUserAssignment.php.

References raiseEvent().

103  : void
104  {
105  $this->raiseEvent('deassignUserFromPosition');
106  parent::delete();
107  }
+ Here is the call graph for this function:

◆ findOrCreateAssignment()

static ilOrgUnitUserAssignment::findOrCreateAssignment ( int  $user_id,
int  $position_id,
int  $orgu_id 
)
static

Definition at line 64 of file class.ilOrgUnitUserAssignment.php.

Referenced by ilOrgUnitUserAssignmentGUI\addStaff(), ilOrgUnitUserAssignmentGUI\addStaffFromSearch(), ilOrgUnitPositionGUI\assign(), ilObjOrgUnit\assignUsersToEmployeeRole(), ilObjOrgUnit\assignUsersToSuperiorRole(), ilObjOrgUnit\deassignUserFromEmployeeRole(), ilObjOrgUnit\deassignUserFromSuperiorRole(), ILIAS\OrgUnit\Webservices\SOAP\AddUserIdToPositionInOrgUnit\run(), and ilOrgUnitSimpleUserImport\simpleUserImportElement().

65  {
66  $inst = self::where(array(
67  'user_id' => $user_id,
68  'position_id' => $position_id,
69  'orgu_id' => $orgu_id
70  ))->first();
71  if (!$inst) {
72  $inst = new self();
73  $inst->setPositionId($position_id);
74  $inst->setUserId($user_id);
75  $inst->setOrguId($orgu_id);
76  $inst->create();
77  }
78 
79  return $inst;
80  }
+ Here is the caller graph for this function:

◆ getId()

ilOrgUnitUserAssignment::getId ( )

Definition at line 109 of file class.ilOrgUnitUserAssignment.php.

References $id.

109  : ?int
110  {
111  return $this->id;
112  }

◆ getOrguId()

ilOrgUnitUserAssignment::getOrguId ( )

Definition at line 139 of file class.ilOrgUnitUserAssignment.php.

References $orgu_id.

Referenced by raiseEvent().

139  : int
140  {
141  return $this->orgu_id;
142  }
+ Here is the caller graph for this function:

◆ getPositionId()

ilOrgUnitUserAssignment::getPositionId ( )

Definition at line 129 of file class.ilOrgUnitUserAssignment.php.

References $position_id.

Referenced by raiseEvent().

129  : int
130  {
131  return $this->position_id;
132  }
+ Here is the caller graph for this function:

◆ getUserId()

ilOrgUnitUserAssignment::getUserId ( )

Definition at line 119 of file class.ilOrgUnitUserAssignment.php.

References $user_id.

Referenced by raiseEvent().

119  : int
120  {
121  return $this->user_id;
122  }
+ Here is the caller graph for this function:

◆ raiseEvent()

ilOrgUnitUserAssignment::raiseEvent ( string  $event)
protected

Definition at line 82 of file class.ilOrgUnitUserAssignment.php.

References $DIC, getOrguId(), getPositionId(), and getUserId().

Referenced by create(), and delete().

82  : void
83  {
84  global $DIC;
85 
86  if (!$DIC->offsetExists('ilAppEventHandler')) {
87  return;
88  }
89  $ilAppEventHandler = $DIC['ilAppEventHandler'];
90  $ilAppEventHandler->raise('Modules/OrgUnit', $event, array(
91  'obj_id' => $this->getOrguId(),
92  'usr_id' => $this->getUserId(),
93  'position_id' => $this->getPositionId()
94  ));
95  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnDbTableName()

static ilOrgUnitUserAssignment::returnDbTableName ( )
static

Definition at line 27 of file class.ilOrgUnitUserAssignment.php.

27  : string
28  {
29  return 'il_orgu_ua';
30  }

◆ setId()

ilOrgUnitUserAssignment::setId ( ?int  $id)

Definition at line 114 of file class.ilOrgUnitUserAssignment.php.

References $id.

114  : void
115  {
116  $this->id = $id;
117  }

◆ setOrguId()

ilOrgUnitUserAssignment::setOrguId ( int  $orgu_id)

Definition at line 144 of file class.ilOrgUnitUserAssignment.php.

References $orgu_id.

144  : void
145  {
146  $this->orgu_id = $orgu_id;
147  }

◆ setPositionId()

ilOrgUnitUserAssignment::setPositionId ( int  $position_id)

Definition at line 134 of file class.ilOrgUnitUserAssignment.php.

References $position_id.

135  {
136  $this->position_id = $position_id;
137  }

◆ setUserId()

ilOrgUnitUserAssignment::setUserId ( int  $user_id)

Definition at line 124 of file class.ilOrgUnitUserAssignment.php.

References $user_id.

125  {
126  $this->user_id = $user_id;
127  }

Field Documentation

◆ $id

int ilOrgUnitUserAssignment::$id = 0
protected

Definition at line 41 of file class.ilOrgUnitUserAssignment.php.

Referenced by getId(), and setId().

◆ $orgu_id

int ilOrgUnitUserAssignment::$orgu_id = 0
protected

Definition at line 62 of file class.ilOrgUnitUserAssignment.php.

Referenced by getOrguId(), and setOrguId().

◆ $position_id

int ilOrgUnitUserAssignment::$position_id = 0
protected

Definition at line 55 of file class.ilOrgUnitUserAssignment.php.

Referenced by getPositionId(), and setPositionId().

◆ $user_id

int ilOrgUnitUserAssignment::$user_id = 0
protected

Definition at line 48 of file class.ilOrgUnitUserAssignment.php.

Referenced by getUserId(), and setUserId().


The documentation for this class was generated from the following file: