ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilOrgUnitUserAssignment Class Reference

Class ilOrgUnitUserAssignment. More...

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

Public Member Functions

 getId ()
 
 setId ($id)
 
 getUserId ()
 
 setUserId ($user_id)
 
 getPositionId ()
 
 setPositionId ($position_id)
 
 getOrguId ()
 
 setOrguId ($orgu_id)
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 
 setConnectorContainerName ($connector_container_name)
 
 getPrimaryFieldValue ()
 
 setPrimaryFieldValue ($value)
 
 __construct ($primary_key=0, arConnector $connector=null)
 
 storeObjectToCache ()
 
 __getConvertedDateFieldsAsArray ($format=null)
 
 __asCsv ($separator=';', $header=false)
 
 __asArray ()
 
 __asStdClass ()
 
 __asSerializedObject ()
 
 buildFromArray (array $array)
 
 fixDateField ($field_name, $value)
 
 sleep ($field_name)
 
 wakeUp ($field_name, $field_value)
 
 getArrayForDb ()
 
 getArrayForConnector ()
 
 installConnector ()
 
 store ()
 
 save ()
 
 create ()
 
 copy ($new_id=0)
 
 afterObjectLoad ()
 
 read ()
 
 update ()
 
 delete ()
 
 __call ($name, $arguments)
 

Static Public Member Functions

static returnDbTableName ()
 
static findOrCreateAssignment ($user_id, $position_id, $orgu_id)
 
- Static Public Member Functions inherited from ActiveRecord
static returnDbTableName ()
 
static installDB ()
 
static renameDBField ($old_name, $new_name)
 
static tableExists ()
 
static fieldExists ($field_name)
 
static removeDBField ($field_name)
 
static updateDB ()
 
static resetDB ()
 
static truncateDB ()
 
static flushDB ()
 
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, $fields=array(' *'), $operator='=', $both_external=false)
 
static innerjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static leftjoin ($tablename, $on_this, $on_external, $fields=array(' *'), $operator='=', $both_external=false)
 
static orderBy ($orderBy, $orderDirection='ASC')
 
static dateFormat ($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 ($set_raw=true)
 
static getArray ($key=null, $values=null)
 
static _toCamelCase ($str, $capitalise_first_char=false)
 

Protected Attributes

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

Additional Inherited Members

- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 
- Protected Member Functions inherited from ActiveRecord
 serializeToCSV ($field)
 This method is called for every field of your instance if you use __asCsv. More...
 
 installDatabase ()
 
- Static Protected Member Functions inherited from ActiveRecord
static getCalledClass ()
 
static fromCamelCase ($str)
 

Detailed Description

Member Function Documentation

◆ findOrCreateAssignment()

static ilOrgUnitUserAssignment::findOrCreateAssignment (   $user_id,
  $position_id,
  $orgu_id 
)
static
Parameters
$user_id
$position_id
$orgu_id
Returns

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

References $orgu_id, $position_id, $user_id, and array.

Referenced by ilOrgUnitUserAssignmentGUI\addStaff(), ilOrgUnitPositionGUI\assign(), ilObjOrgUnit\assignUsersToEmployeeRole(), ilObjOrgUnit\assignUsersToSuperiorRole(), ilObjOrgUnit\deassignUserFromEmployeeRole(), and ilObjOrgUnit\deassignUserFromSuperiorRole().

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  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getId()

ilOrgUnitUserAssignment::getId ( )
Returns
int

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

References $id.

◆ getOrguId()

ilOrgUnitUserAssignment::getOrguId ( )
Returns
int

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

References $orgu_id.

◆ getPositionId()

ilOrgUnitUserAssignment::getPositionId ( )
Returns
int

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

References $position_id.

◆ getUserId()

ilOrgUnitUserAssignment::getUserId ( )
Returns
int

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

References $user_id.

◆ returnDbTableName()

static ilOrgUnitUserAssignment::returnDbTableName ( )
static
Returns
string

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

15  {
16  return 'il_orgu_ua';
17  }

◆ setId()

ilOrgUnitUserAssignment::setId (   $id)
Parameters
int$id

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

References $id.

96  {
97  $this->id = $id;
98  }

◆ setOrguId()

ilOrgUnitUserAssignment::setOrguId (   $orgu_id)
Parameters
int$orgu_id

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

References $orgu_id.

150  {
151  $this->orgu_id = $orgu_id;
152  }

◆ setPositionId()

ilOrgUnitUserAssignment::setPositionId (   $position_id)
Parameters
int$position_id

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

References $position_id.

132  {
133  $this->position_id = $position_id;
134  }

◆ setUserId()

ilOrgUnitUserAssignment::setUserId (   $user_id)
Parameters
int$user_id

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

References $user_id.

114  {
115  $this->user_id = $user_id;
116  }

Field Documentation

◆ $id

ilOrgUnitUserAssignment::$id = 0
protected

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

Referenced by getId(), and setId().

◆ $orgu_id

ilOrgUnitUserAssignment::$orgu_id = 0
protected

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

Referenced by findOrCreateAssignment(), getOrguId(), and setOrguId().

◆ $position_id

ilOrgUnitUserAssignment::$position_id = 0
protected

◆ $user_id

ilOrgUnitUserAssignment::$user_id = 0
protected

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

Referenced by findOrCreateAssignment(), getUserId(), and setUserId().


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