ILIAS  release_8 Revision v8.23
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 ()
 Get dashboard settings ref id. More...
 

Protected Attributes

ilRbacSystem $rbac_system
 
ilDBInterface $db
 

Static Protected Attributes

static int $setting_ref_id = 0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC.

28  {
29  global $DIC;
30 
31  $this->db = $DIC->database();
32  $this->rbac_system = $DIC->rbac()->system();
33  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ canChangePresentation()

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

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

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

56  : bool
57  {
58  return $this->rbac_system->checkAccessOfUser($user_id, "change_presentation", $this->getSettingsRefId());
59  }
getSettingsRefId()
Get dashboard settings ref id.
+ Here is the call graph for this function:

◆ getSettingsRefId()

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

Get dashboard settings ref id.

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

References ILIAS\Repository\int(), and SYSTEM_FOLDER_ID.

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

38  : int
39  {
40  if (self::$setting_ref_id == 0) {
41  $set = $this->db->queryF(
42  'SELECT object_reference.ref_id FROM object_reference, tree, object_data
43  WHERE tree.parent = %s
44  AND object_data.type = %s
45  AND object_reference.ref_id = tree.child
46  AND object_reference.obj_id = object_data.obj_id',
47  array('integer', 'text'),
48  array(SYSTEM_FOLDER_ID, 'dshs')
49  );
50  $rec = $this->db->fetchAssoc($set);
51  self::$setting_ref_id = (int) $rec["ref_id"];
52  }
53  return self::$setting_ref_id;
54  }
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 24 of file class.DashboardAccess.php.

◆ $rbac_system

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

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

◆ $setting_ref_id

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

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


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