ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilOrgUnitAuthority Class Reference

Class ilOrguAuthority. More...

+ Collaboration diagram for ilOrgUnitAuthority:

Public Member Functions

 __construct ($id=0)
 
 __toString ()
 
 getId ()
 
 getOver ()
 
 withOver (int $over)
 
 getScope ()
 
 withScope (int $scope)
 
 getPositionId ()
 
 withPositionId (int $position_id)
 

Static Public Member Functions

static getScopes ()
 

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 SCOPES
 

Protected Attributes

int $id
 
int $over = self::OVER_EVERYONE
 
int $scope = self::SCOPE_SAME_ORGU
 
int $position_id = 0
 

Detailed Description

Class ilOrguAuthority.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitAuthority::__construct (   $id = 0)

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

References $id.

44  {
45  $this->id = $id;
46  }

Member Function Documentation

◆ __toString()

ilOrgUnitAuthority::__toString ( )

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

References $id.

56  : string
57  {
58  return (string) $this->id;
59  }

◆ getId()

ilOrgUnitAuthority::getId ( )

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

References $id.

Referenced by ilOrgUnitAuthorityDBRepository\store(), and ilOrgUnitAuthorityDBRepository\update().

61  : int
62  {
63  return $this->id;
64  }
+ Here is the caller graph for this function:

◆ getOver()

ilOrgUnitAuthority::getOver ( )

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

References $over.

Referenced by ilOrgUnitAuthorityDBRepository\insert(), and ilOrgUnitAuthorityDBRepository\update().

66  : int
67  {
68  return $this->over;
69  }
+ Here is the caller graph for this function:

◆ getPositionId()

ilOrgUnitAuthority::getPositionId ( )

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

References $position_id.

Referenced by ilOrgUnitAuthorityDBRepository\insert(), and ilOrgUnitAuthorityDBRepository\update().

93  : int
94  {
95  return $this->position_id;
96  }
+ Here is the caller graph for this function:

◆ getScope()

ilOrgUnitAuthority::getScope ( )

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

References $scope.

Referenced by ilOrgUnitAuthorityDBRepository\insert(), and ilOrgUnitAuthorityDBRepository\update().

78  : int
79  {
80  return $this->scope;
81  }
+ Here is the caller graph for this function:

◆ getScopes()

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

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

Referenced by ilOrgUnitAuthorityInputGUI\getValue(), and ilOrgUnitPositionFormGUI\initFormElements().

51  : array
52  {
53  return self::SCOPES;
54  }
+ Here is the caller graph for this function:

◆ withOver()

ilOrgUnitAuthority::withOver ( int  $over)

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

References $over.

71  : self
72  {
73  $clone = clone $this;
74  $clone->over = $over;
75  return $clone;
76  }

◆ withPositionId()

ilOrgUnitAuthority::withPositionId ( int  $position_id)

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

References $position_id.

98  : self
99  {
100  $clone = clone $this;
101  $clone->position_id = $position_id;
102  return $clone;
103  }

◆ withScope()

ilOrgUnitAuthority::withScope ( int  $scope)

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

References $scope.

83  : self
84  {
85  if (!in_array($scope, self::SCOPES)) {
86  throw new ilException('Selected Scope in ' . self::class . ' not allowed');
87  }
88  $clone = clone $this;
89  $clone->scope = $scope;
90  return $clone;
91  }

Field Documentation

◆ $id

int ilOrgUnitAuthority::$id
protected

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

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

◆ $over

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

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

Referenced by getOver(), and withOver().

◆ $position_id

int ilOrgUnitAuthority::$position_id = 0
protected

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

Referenced by getPositionId(), and withPositionId().

◆ $scope

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

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

Referenced by getScope(), and withScope().

◆ FIELD_OVER

const ilOrgUnitAuthority::FIELD_OVER = 'over'

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

Referenced by ilOrgUnitAuthorityDBRepository\get().

◆ OVER_EVERYONE

◆ POSITION_ID

◆ SCOPE_SAME_ORGU

◆ SCOPE_SUBSEQUENT_ORGUS

◆ SCOPES

const ilOrgUnitAuthority::SCOPES
Initial value:
= [
self::SCOPE_SAME_ORGU,
self::SCOPE_SUBSEQUENT_ORGUS
]

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


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