ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilContainerAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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}
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:66
$results
global $DIC
Definition: shib_login.php:26