ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilContainerReferenceAccess Class Reference
+ Inheritance diagram for ilContainerReferenceAccess:
+ Collaboration diagram for ilContainerReferenceAccess:

Static Public Member Functions

static _isAccessible (int $a_ref_id)
 Check if target is accessible and not deleted. More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto (string $target)
 check whether goto script will succeed More...
 
static _isOffline (int $obj_id)
 Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More...
 
static _preloadData (array $obj_ids, array $ref_ids)
 Preload data. More...
 

Additional Inherited Members

- Public Member Functions inherited from ilObjectAccess
 _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 Checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Detailed Description

Member Function Documentation

◆ _isAccessible()

static ilContainerReferenceAccess::_isAccessible ( int  $a_ref_id)
static

Check if target is accessible and not deleted.

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

References $DIC, $ilDB, $res, ilObject\_getAllReferences(), ilObject\_lookupObjId(), ilDBConstants\FETCHMODE_OBJECT, and ILIAS\Repository\int().

Referenced by ilRepositoryExplorer\isClickable().

29  : bool
30  {
31  global $DIC;
32 
33  $ilDB = $DIC->database();
34  $tree = $DIC->repositoryTree();
35  $access = $DIC->access();
36 
37  $obj_id = ilObject::_lookupObjId($a_ref_id);
38  $query = "SELECT target_obj_id FROM container_reference " .
39  "WHERE obj_id = " . $ilDB->quote($obj_id, 'integer') . " ";
40  $res = $ilDB->query($query);
41  $target_id = 0;
42  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
43  $target_id = (int) $row->target_obj_id;
44  }
45  $target_ref_ids = ilObject::_getAllReferences($target_id);
46  $target_ref_id = current($target_ref_ids);
47  return
48  !$tree->isDeleted($target_ref_id) &&
49  $access->checkAccess('read', '', $target_ref_id);
50  }
$res
Definition: ltiservices.php:66
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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