ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 25 of file class.ilOrgUnitAuthority.php.

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitAuthority::__construct (   $id = 0)

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

References $id.

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

Member Function Documentation

◆ __toString()

ilOrgUnitAuthority::__toString ( )

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

References $id.

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

◆ getId()

ilOrgUnitAuthority::getId ( )

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

References $id.

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

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

◆ getOver()

ilOrgUnitAuthority::getOver ( )

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

References $over.

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

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

◆ getPositionId()

ilOrgUnitAuthority::getPositionId ( )

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

References $position_id.

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

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

◆ getScope()

ilOrgUnitAuthority::getScope ( )

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

References $scope.

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

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

◆ getScopes()

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

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

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

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

◆ withOver()

ilOrgUnitAuthority::withOver ( int  $over)

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

References $over.

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

◆ withPositionId()

ilOrgUnitAuthority::withPositionId ( int  $position_id)

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

References $position_id.

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

◆ withScope()

ilOrgUnitAuthority::withScope ( int  $scope)

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

References $scope.

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

Field Documentation

◆ $id

int ilOrgUnitAuthority::$id
protected

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

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

◆ $over

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

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

Referenced by getOver(), and withOver().

◆ $position_id

int ilOrgUnitAuthority::$position_id = 0
protected

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

Referenced by getPositionId(), and withPositionId().

◆ $scope

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

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

Referenced by getScope(), and withScope().

◆ FIELD_OVER

const ilOrgUnitAuthority::FIELD_OVER = 'over'

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


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