ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilContainerAccess.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
25 {
26  public function canBeDelivered(ilWACPath $ilWACPath): bool
27  {
28  global $DIC;
29 
30  $access = $DIC->access();
31 
32  preg_match("/\\/obj_([\\d]*)\\//uim", $ilWACPath->getPath(), $results);
33  foreach (ilObject2::_getAllReferences((int) $results[1]) as $ref_id) {
34  if ($access->checkAccess('visible', '', $ref_id) || $access->checkAccess('read', '', $ref_id)) {
35  return true;
36  }
37  }
38 
39  return false;
40  }
41 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
canBeDelivered(ilWACPath $ilWACPath)
static _getAllReferences(int $id)
get all reference ids for object ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
$results
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...