ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilOrgUnitAuthority Class Reference

Class ilOrguAuthority. More...

+ Inheritance diagram for ilOrgUnitAuthority:
+ Collaboration diagram for ilOrgUnitAuthority:

Public Member Functions

 __construct ($primary_key=0, \arConnector $connector=null)
 ilOrgUnitAuthority constructor. More...
 
 __toString ()
 
 __toArray ()
 
 getId ()
 
 setId ($id)
 
 getOver ()
 
 setOver ($over)
 This is either an ID of a position or ilOrgUnitAuthority::OVER_EVERYONE. More...
 
 getScope ()
 
 setScope ($scope)
 This is either ilOrgUnitAuthority::SCOPE_SAME_ORGU, ilOrgUnitAuthority::SCOPE_ALL_ORGUS or ilOrgUnitAuthority::SCOPE_SUBSEQUENT_ORGUS. More...
 
 getPositionId ()
 
 setPositionId ($position_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 getScopes ()
 
static returnDbTableName ()
 
static replaceNameRenderer (Closure $closure)
 
- 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)
 

Data Fields

const FIELD_OVER = 'over'
 
const OVER_EVERYONE = -1
 
const POSITION_ID = "position_id"
 
const SCOPE_SAME_ORGU = 1
 
const SCOPE_SUBSEQUENT_ORGUS = 2
 
const SCOPE_ALL_ORGUS = 3
 
- Data Fields inherited from ActiveRecord
const ACTIVE_RECORD_VERSION = '2.0.7'
 

Protected Attributes

 $id = 0
 
 $over = self::OVER_EVERYONE
 
 $scope = self::SCOPE_SAME_ORGU
 
 $position_id = 0
 
- Protected Attributes inherited from ActiveRecord
 $ar_safe_read = true
 
 $connector_container_name = ''
 

Static Protected Attributes

static $scopes
 
static $name_render
 

Additional Inherited Members

- 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

Class ilOrguAuthority.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 10 of file class.ilOrgUnitAuthority.php.

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitAuthority::__construct (   $primary_key = 0,
\arConnector  $connector = null 
)

ilOrgUnitAuthority constructor.

Parameters
int$primary_key
\arConnector | null$connector

Definition at line 93 of file class.ilOrgUnitAuthority.php.

94 {
95 parent::__construct($primary_key, $connector);
96 if (!self::$name_render) {
97 self::$name_render = function ($id) {
98 return $id;
99 };
100 }
101 }

References $id.

Member Function Documentation

◆ __toArray()

ilOrgUnitAuthority::__toArray ( )
Returns
array

Definition at line 127 of file class.ilOrgUnitAuthority.php.

128 {
129 return array(
130 'id' => $this->getId(),
131 'over' => $this->getOver(),
132 'scope' => $this->getScope(),
133 'position_id' => $this->getPositionId(),
134 );
135 }

References getId(), getOver(), getPositionId(), and getScope().

+ Here is the call graph for this function:

◆ __toString()

ilOrgUnitAuthority::__toString ( )
Returns
string

Definition at line 116 of file class.ilOrgUnitAuthority.php.

117 {
118 $renderer = self::$name_render;
119
120 return $renderer($this->getId());
121 }

References $name_render, and getId().

+ Here is the call graph for this function:

◆ getId()

ilOrgUnitAuthority::getId ( )
Returns
int

Definition at line 141 of file class.ilOrgUnitAuthority.php.

142 {
143 return $this->id;
144 }

References $id.

Referenced by __toArray(), and __toString().

+ Here is the caller graph for this function:

◆ getOver()

ilOrgUnitAuthority::getOver ( )
Returns
int

Definition at line 159 of file class.ilOrgUnitAuthority.php.

160 {
161 return $this->over;
162 }

References $over.

Referenced by __toArray().

+ Here is the caller graph for this function:

◆ getPositionId()

ilOrgUnitAuthority::getPositionId ( )
Returns
int

Definition at line 205 of file class.ilOrgUnitAuthority.php.

References $position_id.

Referenced by __toArray().

+ Here is the caller graph for this function:

◆ getScope()

ilOrgUnitAuthority::getScope ( )
Returns
int

Definition at line 179 of file class.ilOrgUnitAuthority.php.

References $scope.

Referenced by __toArray().

+ Here is the caller graph for this function:

◆ getScopes()

static ilOrgUnitAuthority::getScopes ( )
static
Returns
array

Definition at line 31 of file class.ilOrgUnitAuthority.php.

32 {
33 return self::$scopes;
34 }

References $scopes.

Referenced by ilOrgUnitPositionFormGUI\initFormElements().

+ Here is the caller graph for this function:

◆ replaceNameRenderer()

static ilOrgUnitAuthority::replaceNameRenderer ( Closure  $closure)
static
Parameters
\Closure$closure

Definition at line 107 of file class.ilOrgUnitAuthority.php.

108 {
109 self::$name_render = $closure;
110 }

◆ returnDbTableName()

static ilOrgUnitAuthority::returnDbTableName ( )
static
Returns
string

Reimplemented from ActiveRecord.

Definition at line 40 of file class.ilOrgUnitAuthority.php.

41 {
42 return "il_orgu_authority";
43 }

◆ setId()

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

Definition at line 150 of file class.ilOrgUnitAuthority.php.

151 {
152 $this->id = $id;
153 }

References $id.

◆ setOver()

ilOrgUnitAuthority::setOver (   $over)

This is either an ID of a position or ilOrgUnitAuthority::OVER_EVERYONE.

Parameters
int$over

Definition at line 170 of file class.ilOrgUnitAuthority.php.

171 {
172 $this->over = $over;
173 }

References $over.

◆ setPositionId()

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

Definition at line 214 of file class.ilOrgUnitAuthority.php.

215 {
216 $this->position_id = $position_id;
217 }

References $position_id.

◆ setScope()

ilOrgUnitAuthority::setScope (   $scope)

This is either ilOrgUnitAuthority::SCOPE_SAME_ORGU, ilOrgUnitAuthority::SCOPE_ALL_ORGUS or ilOrgUnitAuthority::SCOPE_SUBSEQUENT_ORGUS.

Parameters
int$scope
Exceptions

ilException

Definition at line 193 of file class.ilOrgUnitAuthority.php.

194 {
195 if (!in_array($scope, self::$scopes)) {
196 throw new ilException('Selected Scop in ' . self::class . ' not allowed');
197 }
198 $this->scope = $scope;
199 }
Base class for ILIAS Exception handling.

References $scope.

Field Documentation

◆ $id

ilOrgUnitAuthority::$id = 0
protected

Definition at line 56 of file class.ilOrgUnitAuthority.php.

Referenced by __construct(), getId(), and setId().

◆ $name_render

ilOrgUnitAuthority::$name_render
staticprotected

Definition at line 84 of file class.ilOrgUnitAuthority.php.

Referenced by __toString().

◆ $over

ilOrgUnitAuthority::$over = self::OVER_EVERYONE
protected

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

Referenced by getOver(), and setOver().

◆ $position_id

ilOrgUnitAuthority::$position_id = 0
protected

Definition at line 80 of file class.ilOrgUnitAuthority.php.

Referenced by getPositionId(), and setPositionId().

◆ $scope

ilOrgUnitAuthority::$scope = self::SCOPE_SAME_ORGU
protected

Definition at line 72 of file class.ilOrgUnitAuthority.php.

Referenced by getScope(), and setScope().

◆ $scopes

ilOrgUnitAuthority::$scopes
staticprotected
Initial value:
= array(
self::SCOPE_SAME_ORGU,
self::SCOPE_SUBSEQUENT_ORGUS,
)

Definition at line 21 of file class.ilOrgUnitAuthority.php.

Referenced by getScopes().

◆ FIELD_OVER

const ilOrgUnitAuthority::FIELD_OVER = 'over'

◆ OVER_EVERYONE

const ilOrgUnitAuthority::OVER_EVERYONE = -1

◆ POSITION_ID

const ilOrgUnitAuthority::POSITION_ID = "position_id"

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

Referenced by ilOrgUnitPosition\afterObjectLoad().

◆ SCOPE_ALL_ORGUS

const ilOrgUnitAuthority::SCOPE_ALL_ORGUS = 3

Definition at line 17 of file class.ilOrgUnitAuthority.php.

◆ SCOPE_SAME_ORGU

const ilOrgUnitAuthority::SCOPE_SAME_ORGU = 1

◆ SCOPE_SUBSEQUENT_ORGUS

const ilOrgUnitAuthority::SCOPE_SUBSEQUENT_ORGUS = 2

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