ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\Dashboard\Access\DashboardAccess Class Reference
+ Collaboration diagram for ILIAS\Dashboard\Access\DashboardAccess:

Public Member Functions

 __construct ()
 
 canChangePresentation (int $user_id)
 

Protected Member Functions

 getSettingsRefId ()
 

Protected Attributes

ilRbacSystem $rbac_system
 
ilDBInterface $db
 

Static Protected Attributes

static int $setting_ref_id = 0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Dashboard\Access\DashboardAccess::__construct ( )

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

References $DIC.

34  {
35  global $DIC;
36 
37  $this->db = $DIC->database();
38  $this->rbac_system = $DIC->rbac()->system();
39  }
global $DIC
Definition: shib_login.php:26

Member Function Documentation

◆ canChangePresentation()

ILIAS\Dashboard\Access\DashboardAccess::canChangePresentation ( int  $user_id)

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

References ILIAS\Dashboard\Access\DashboardAccess\getSettingsRefId().

59  : bool
60  {
61  return $this->rbac_system->checkAccessOfUser($user_id, 'change_presentation', $this->getSettingsRefId());
62  }
+ Here is the call graph for this function:

◆ getSettingsRefId()

ILIAS\Dashboard\Access\DashboardAccess::getSettingsRefId ( )
protected

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

References ILIAS\Repository\int(), SYSTEM_FOLDER_ID, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

Referenced by ILIAS\Dashboard\Access\DashboardAccess\canChangePresentation().

41  : int
42  {
43  if (self::$setting_ref_id == 0) {
44  $set = $this->db->queryF(
45  'SELECT object_reference.ref_id FROM object_reference, tree, object_data
46  WHERE tree.parent = %s
47  AND object_data.type = %s
48  AND object_reference.ref_id = tree.child
49  AND object_reference.obj_id = object_data.obj_id',
51  [SYSTEM_FOLDER_ID, 'dshs']
52  );
53  $rec = $this->db->fetchAssoc($set);
54  self::$setting_ref_id = (int) $rec['ref_id'];
55  }
56  return self::$setting_ref_id;
57  }
const SYSTEM_FOLDER_ID
Definition: constants.php:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilDBInterface ILIAS\Dashboard\Access\DashboardAccess::$db
protected

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

◆ $rbac_system

ilRbacSystem ILIAS\Dashboard\Access\DashboardAccess::$rbac_system
protected

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

◆ $setting_ref_id

int ILIAS\Dashboard\Access\DashboardAccess::$setting_ref_id = 0
staticprotected

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


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