ILIAS  release_8 Revision v8.24
ilOrgUnitAuthority Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 __construct ($primary_key=0)
 ilOrgUnitAuthority constructor. More...
 
 __toString ()
 
 __toArray ()
 
 getId ()
 
 setId ($id)
 
 getOver ()
 
 setOver (int $over)
 This is either an ID of a position or ilOrgUnitAuthority::OVER_EVERYONE. More...
 
 getScope ()
 
 setScope (int $scope)
 This is either ilOrgUnitAuthority::SCOPE_SAME_ORGU, ilOrgUnitAuthority::SCOPE_ALL_ORGUS or ilOrgUnitAuthority::SCOPE_SUBSEQUENT_ORGUS. More...
 
 getPositionId ()
 
 setPositionId (int $position_id)
 
- Public Member Functions inherited from ActiveRecord
 getArConnector ()
 
 getArFieldList ()
 
 getConnectorContainerName ()
 @description 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 getScopes ()
 
static returnDbTableName ()
 
static replaceNameRenderer (Closure $closure)
 
- 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 ()
 @depracated 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)
 

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
 

Protected Attributes

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

Static Protected Attributes

static $scopes
 
static Closure $name_render = null
 

Additional Inherited Members

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

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilOrguAuthority

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

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

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitAuthority::__construct (   $primary_key = 0)

ilOrgUnitAuthority constructor.

Parameters
$primary_key

Reimplemented from ActiveRecord.

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

93 {
94 parent::__construct($primary_key);
95 if (static::$name_render === null) {
96 self::$name_render = function ($id) {
97 return $id;
98 };
99 }
100 }
__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 ( )

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

117 : array
118 {
119 return array(
120 'id' => $this->getId(),
121 'over' => $this->getOver(),
122 'scope' => $this->getScope(),
123 'position_id' => $this->getPositionId(),
124 );
125 }

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

+ Here is the call graph for this function:

◆ __toString()

ilOrgUnitAuthority::__toString ( )

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

110 : string
111 {
112 $renderer = self::$name_render;
113
114 return (string) $renderer($this->getId());
115 }

References $name_render, and getId().

+ Here is the call graph for this function:

◆ getId()

ilOrgUnitAuthority::getId ( )
Returns
mixed

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

131 {
132 return $this->id;
133 }

References $id.

Referenced by __toArray(), and __toString().

+ Here is the caller graph for this function:

◆ getOver()

ilOrgUnitAuthority::getOver ( )

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

143 : int
144 {
145 return $this->over;
146 }

References $over.

Referenced by __toArray().

+ Here is the caller graph for this function:

◆ getPositionId()

ilOrgUnitAuthority::getPositionId ( )

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

175 : int
176 {
177 return $this->position_id;
178 }

References $position_id.

Referenced by __toArray().

+ Here is the caller graph for this function:

◆ getScope()

ilOrgUnitAuthority::getScope ( )

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

156 : int
157 {
158 return $this->scope;
159 }

References $scope.

Referenced by __toArray().

+ Here is the caller graph for this function:

◆ getScopes()

static ilOrgUnitAuthority::getScopes ( )
static
Returns
int[]

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

45 : array
46 {
47 return self::$scopes;
48 }

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

106 {
107 self::$name_render = $closure;
108 }

◆ returnDbTableName()

static ilOrgUnitAuthority::returnDbTableName ( )
static
Exceptions

arException

Deprecated:

Reimplemented from ActiveRecord.

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

50 : string
51 {
52 return "il_orgu_authority";
53 }

◆ setId()

ilOrgUnitAuthority::setId (   $id)
Parameters
mixed

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

138 : void
139 {
140 $this->id = $id;
141 }

References $id.

◆ setOver()

ilOrgUnitAuthority::setOver ( int  $over)

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

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

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

References $over.

◆ setPositionId()

ilOrgUnitAuthority::setPositionId ( int  $position_id)

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

181 {
182 $this->position_id = $position_id;
183 }

References $position_id.

◆ setScope()

ilOrgUnitAuthority::setScope ( int  $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 167 of file class.ilOrgUnitAuthority.php.

167 : void
168 {
169 if (!in_array($scope, self::$scopes)) {
170 throw new ilException('Selected Scop in ' . self::class . ' not allowed');
171 }
172 $this->scope = $scope;
173 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$scopes
Definition: ltitoken.php:99

References $scope, and $scopes.

Field Documentation

◆ $id

ilOrgUnitAuthority::$id = 0
protected

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

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

◆ $name_render

Closure ilOrgUnitAuthority::$name_render = null
staticprotected

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

Referenced by __toString().

◆ $over

int ilOrgUnitAuthority::$over = self::OVER_EVERYONE
protected

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

Referenced by getOver(), and setOver().

◆ $position_id

int ilOrgUnitAuthority::$position_id = 0
protected

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

Referenced by getPositionId(), and setPositionId().

◆ $scope

int ilOrgUnitAuthority::$scope = self::SCOPE_SAME_ORGU
protected

Definition at line 78 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 36 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 29 of file class.ilOrgUnitAuthority.php.

Referenced by ilOrgUnitPosition\afterObjectLoad().

◆ SCOPE_ALL_ORGUS

const ilOrgUnitAuthority::SCOPE_ALL_ORGUS = 3

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

◆ SCOPE_SAME_ORGU

const ilOrgUnitAuthority::SCOPE_SAME_ORGU = 1

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

◆ SCOPE_SUBSEQUENT_ORGUS

const ilOrgUnitAuthority::SCOPE_SUBSEQUENT_ORGUS = 2

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


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