ILIAS  release_7 Revision v7.30-3-g800a261c036
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 94 of file class.ilOrgUnitAuthority.php.

95 {
96 parent::__construct($primary_key, $connector);
97 if (!self::$name_render) {
98 self::$name_render = function ($id) {
99 return $id;
100 };
101 }
102 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $id, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ __toArray()

ilOrgUnitAuthority::__toArray ( )
Returns
array

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

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

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

+ Here is the call graph for this function:

◆ __toString()

ilOrgUnitAuthority::__toString ( )
Returns
string

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

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

References $name_render, and getId().

+ Here is the call graph for this function:

◆ getId()

ilOrgUnitAuthority::getId ( )
Returns
int

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

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

References $id.

Referenced by __toArray(), and __toString().

+ Here is the caller graph for this function:

◆ getOver()

ilOrgUnitAuthority::getOver ( )
Returns
int

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

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

References $over.

Referenced by __toArray().

+ Here is the caller graph for this function:

◆ getPositionId()

ilOrgUnitAuthority::getPositionId ( )
Returns
int

Definition at line 206 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 180 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 32 of file class.ilOrgUnitAuthority.php.

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

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 108 of file class.ilOrgUnitAuthority.php.

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

◆ returnDbTableName()

static ilOrgUnitAuthority::returnDbTableName ( )
static
Returns
string

Reimplemented from ActiveRecord.

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

42 {
43 return "il_orgu_authority";
44 }

◆ setId()

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

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

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

References $id.

◆ setOver()

ilOrgUnitAuthority::setOver (   $over)

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

Parameters
int$over

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

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

References $over.

◆ setPositionId()

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

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

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

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 194 of file class.ilOrgUnitAuthority.php.

195 {
196 if (!in_array($scope, self::$scopes)) {
197 throw new ilException('Selected Scop in ' . self::class . ' not allowed');
198 }
199 $this->scope = $scope;
200 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $scope.

Field Documentation

◆ $id

ilOrgUnitAuthority::$id = 0
protected

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

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

◆ $name_render

ilOrgUnitAuthority::$name_render
staticprotected

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

Referenced by __toString().

◆ $over

ilOrgUnitAuthority::$over = self::OVER_EVERYONE
protected

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

Referenced by getOver(), and setOver().

◆ $position_id

ilOrgUnitAuthority::$position_id = 0
protected

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

Referenced by getPositionId(), and setPositionId().

◆ $scope

ilOrgUnitAuthority::$scope = self::SCOPE_SAME_ORGU
protected

Definition at line 73 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: