ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContainerReferenceAccess Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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

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

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

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

Member Function Documentation

◆ _isAccessible()

static ilContainerReferenceAccess::_isAccessible ( int  $a_ref_id)
static

Check if target is accessible and not deleted.

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

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

Referenced by ilRepositoryExplorer\isClickable(), and ilRepositoryExplorerGUI\isNodeClickable().

30  : bool
31  {
32  global $DIC;
33 
34  $ilDB = $DIC->database();
35  $tree = $DIC->repositoryTree();
36  $access = $DIC->access();
37 
38  $obj_id = ilObject::_lookupObjId($a_ref_id);
39  $query = "SELECT target_obj_id FROM container_reference " .
40  "WHERE obj_id = " . $ilDB->quote($obj_id, 'integer') . " ";
41  $res = $ilDB->query($query);
42  $target_id = 0;
43  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
44  $target_id = (int) $row->target_obj_id;
45  }
46  $target_ref_ids = ilObject::_getAllReferences($target_id);
47  $target_ref_id = current($target_ref_ids);
48  return
49  !$tree->isDeleted($target_ref_id) &&
50  $access->checkAccess('read', '', $target_ref_id);
51  }
$res
Definition: ltiservices.php:69
static _getAllReferences(int $id)
get all reference ids for object ID
$target_id
Definition: goto.php:52
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
$query
+ 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: