ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 23 of file class.ilOrgUnitObjectTypePositionSetting.php.

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitObjectTypePositionSetting::__construct ( string  $a_obj_type)

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

References $GLOBALS, and read().

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

Member Function Documentation

◆ getActivationDefault()

ilOrgUnitObjectTypePositionSetting::getActivationDefault ( )

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

References $default.

Referenced by update().

+ Here is the caller graph for this function:

◆ getType()

ilOrgUnitObjectTypePositionSetting::getType ( )

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

References $type.

96  : string
97  {
98  return $this->type;
99  }

◆ isActive()

ilOrgUnitObjectTypePositionSetting::isActive ( )

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

References $active.

Referenced by update().

+ Here is the caller graph for this function:

◆ isChangeableForObject()

ilOrgUnitObjectTypePositionSetting::isChangeableForObject ( )

Definition at line 68 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 84 of file class.ilOrgUnitObjectTypePositionSetting.php.

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

Referenced by __construct().

84  : void
85  {
86  $query = 'SELECT * FROM orgu_obj_type_settings ' . 'WHERE obj_type = '
87  . $this->db->quote($this->type, 'text');
88  $res = $this->db->query($query);
89  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
90  $this->setActive((bool) $row->active);
91  $this->setActivationDefault((int) $row->activation_default);
92  $this->setChangeableForObject((bool) $row->changeable);
93  }
94  }
$res
Definition: ltiservices.php:66
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 48 of file class.ilOrgUnitObjectTypePositionSetting.php.

Referenced by read().

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

◆ setActive()

ilOrgUnitObjectTypePositionSetting::setActive ( bool  $a_active)

set active for object type

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

Referenced by read().

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

◆ setChangeableForObject()

ilOrgUnitObjectTypePositionSetting::setChangeableForObject ( bool  $a_status)

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

Referenced by read().

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

◆ update()

ilOrgUnitObjectTypePositionSetting::update ( )

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

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

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

Field Documentation

◆ $active

bool ilOrgUnitObjectTypePositionSetting::$active = false
private

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

Referenced by isActive().

◆ $changeable

bool ilOrgUnitObjectTypePositionSetting::$changeable = false
private

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

Referenced by isChangeableForObject().

◆ $db

ilDBInterface ilOrgUnitObjectTypePositionSetting::$db
private

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

◆ $default

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

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

Referenced by getActivationDefault().

◆ $type

string ilOrgUnitObjectTypePositionSetting::$type
private

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

Referenced by getType().

◆ DEFAULT_OFF

const ilOrgUnitObjectTypePositionSetting::DEFAULT_OFF = 0

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

◆ DEFAULT_ON

const ilOrgUnitObjectTypePositionSetting::DEFAULT_ON = 1

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