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

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

+ Collaboration diagram for ilOrgUnitObjectTypePositionSetting:

Public Member Functions

 __construct (string $a_obj_type)
 
 setActive (bool $a_active)
 set active for object type More...
 
 setActivationDefault (int $a_default)
 
 setChangeableForObject (bool $a_status)
 
 isActive ()
 
 getActivationDefault ()
 
 isChangeableForObject ()
 
 update ()
 
 getType ()
 

Data Fields

const DEFAULT_OFF = 0
 
const DEFAULT_ON = 1
 

Private Member Functions

 read ()
 

Private Attributes

ilDBInterface $db
 
string $type
 
bool $active = false
 
bool $changeable = false
 
int $default = self::DEFAULT_OFF
 

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 Object settings regarding position permissions

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitObjectTypePositionSetting::__construct ( string  $a_obj_type)

Definition at line 35 of file class.ilOrgUnitObjectTypePositionSetting.php.

References $GLOBALS, and read().

36  {
37  $this->db = $GLOBALS['DIC']->database();
38  $this->type = $a_obj_type;
39  $this->read();
40  }
$GLOBALS["DIC"]
Definition: wac.php:30
+ Here is the call graph for this function:

Member Function Documentation

◆ getActivationDefault()

ilOrgUnitObjectTypePositionSetting::getActivationDefault ( )

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

References $default.

Referenced by update().

+ Here is the caller graph for this function:

◆ getType()

ilOrgUnitObjectTypePositionSetting::getType ( )

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

References $type.

98  : string
99  {
100  return $this->type;
101  }

◆ isActive()

ilOrgUnitObjectTypePositionSetting::isActive ( )

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

References $active.

Referenced by update().

+ Here is the caller graph for this function:

◆ isChangeableForObject()

ilOrgUnitObjectTypePositionSetting::isChangeableForObject ( )

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

References $changeable.

Referenced by update().

+ Here is the caller graph for this function:

◆ read()

ilOrgUnitObjectTypePositionSetting::read ( )
private

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

References $res, ilDBConstants\FETCHMODE_OBJECT, setActivationDefault(), setActive(), and setChangeableForObject().

Referenced by __construct().

86  : void
87  {
88  $query = 'SELECT * FROM orgu_obj_type_settings ' . 'WHERE obj_type = '
89  . $this->db->quote($this->type, 'text');
90  $res = $this->db->query($query);
91  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
92  $this->setActive((bool) $row->active);
93  $this->setActivationDefault((int) $row->activation_default);
94  $this->setChangeableForObject((bool) $row->changeable);
95  }
96  }
$res
Definition: ltiservices.php:69
setActive(bool $a_active)
set active for object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActivationDefault()

ilOrgUnitObjectTypePositionSetting::setActivationDefault ( int  $a_default)

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

Referenced by read().

50  : void
51  {
52  $this->default = $a_default;
53  }
+ Here is the caller graph for this function:

◆ setActive()

ilOrgUnitObjectTypePositionSetting::setActive ( bool  $a_active)

set active for object type

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

Referenced by read().

45  : void
46  {
47  $this->active = $a_active;
48  }
+ Here is the caller graph for this function:

◆ setChangeableForObject()

ilOrgUnitObjectTypePositionSetting::setChangeableForObject ( bool  $a_status)

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

Referenced by read().

55  : void
56  {
57  $this->changeable = $a_status;
58  }
+ Here is the caller graph for this function:

◆ update()

ilOrgUnitObjectTypePositionSetting::update ( )

Definition at line 75 of file class.ilOrgUnitObjectTypePositionSetting.php.

References getActivationDefault(), isActive(), and isChangeableForObject().

75  : void
76  {
77  $this->db->replace('orgu_obj_type_settings', [
78  'obj_type' => ['text', $this->type],
79  ], [
80  'active' => ['integer', (int) $this->isActive()],
81  'activation_default' => ['integer', (int) $this->getActivationDefault()],
82  'changeable' => ['integer', (int) $this->isChangeableForObject()],
83  ]);
84  }
+ Here is the call graph for this function:

Field Documentation

◆ $active

bool ilOrgUnitObjectTypePositionSetting::$active = false
private

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

Referenced by isActive().

◆ $changeable

bool ilOrgUnitObjectTypePositionSetting::$changeable = false
private

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

Referenced by isChangeableForObject().

◆ $db

ilDBInterface ilOrgUnitObjectTypePositionSetting::$db
private

Definition at line 29 of file class.ilOrgUnitObjectTypePositionSetting.php.

◆ $default

int ilOrgUnitObjectTypePositionSetting::$default = self::DEFAULT_OFF
private

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

Referenced by getActivationDefault().

◆ $type

string ilOrgUnitObjectTypePositionSetting::$type
private

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

Referenced by getType().

◆ DEFAULT_OFF

const ilOrgUnitObjectTypePositionSetting::DEFAULT_OFF = 0

Definition at line 27 of file class.ilOrgUnitObjectTypePositionSetting.php.

◆ DEFAULT_ON

const ilOrgUnitObjectTypePositionSetting::DEFAULT_ON = 1

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