ILIAS  release_8 Revision v8.24
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 24 of file class.ilOrgUnitObjectTypePositionSetting.php.

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitObjectTypePositionSetting::__construct ( string  $a_obj_type)

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

35 {
36 $this->db = $GLOBALS['DIC']->database();
37 $this->type = $a_obj_type;
38 $this->read();
39 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

References $GLOBALS, and read().

+ Here is the call graph for this function:

Member Function Documentation

◆ getActivationDefault()

ilOrgUnitObjectTypePositionSetting::getActivationDefault ( )

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

References $default.

Referenced by update().

+ Here is the caller graph for this function:

◆ getType()

ilOrgUnitObjectTypePositionSetting::getType ( )

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

References $type.

◆ isActive()

ilOrgUnitObjectTypePositionSetting::isActive ( )

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

References $active.

Referenced by update().

+ Here is the caller graph for this function:

◆ isChangeableForObject()

ilOrgUnitObjectTypePositionSetting::isChangeableForObject ( )

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

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

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

Referenced by __construct().

+ 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 49 of file class.ilOrgUnitObjectTypePositionSetting.php.

49 : void
50 {
51 $this->default = $a_default;
52 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setActive()

ilOrgUnitObjectTypePositionSetting::setActive ( bool  $a_active)

set active for object type

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

44 : void
45 {
46 $this->active = $a_active;
47 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setChangeableForObject()

ilOrgUnitObjectTypePositionSetting::setChangeableForObject ( bool  $a_status)

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

54 : void
55 {
56 $this->changeable = $a_status;
57 }

Referenced by read().

+ Here is the caller graph for this function:

◆ update()

ilOrgUnitObjectTypePositionSetting::update ( )

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

74 : void
75 {
76 $this->db->replace('orgu_obj_type_settings', [
77 'obj_type' => ['text', $this->type],
78 ], [
79 'active' => ['integer', (int) $this->isActive()],
80 'activation_default' => ['integer', (int) $this->getActivationDefault()],
81 'changeable' => ['integer', (int) $this->isChangeableForObject()],
82 ]);
83 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $active

bool ilOrgUnitObjectTypePositionSetting::$active = false
private

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

Referenced by isActive().

◆ $changeable

bool ilOrgUnitObjectTypePositionSetting::$changeable = false
private

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

Referenced by isChangeableForObject().

◆ $db

ilDBInterface ilOrgUnitObjectTypePositionSetting::$db
private

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

◆ $default

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

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

Referenced by getActivationDefault().

◆ $type

string ilOrgUnitObjectTypePositionSetting::$type
private

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

Referenced by getType().

◆ DEFAULT_OFF

const ilOrgUnitObjectTypePositionSetting::DEFAULT_OFF = 0

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

◆ DEFAULT_ON

const ilOrgUnitObjectTypePositionSetting::DEFAULT_ON = 1

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