ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilContainerAccess.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
15{
21 public function canBeDelivered(ilWACPath $ilWACPath)
22 {
23 global $DIC;
24
25 $access = $DIC->access();
26
27 preg_match("/\\/obj_([\\d]*)\\//uism", $ilWACPath->getPath(), $results);
28 foreach (ilObject2::_getAllReferences($results[1]) as $ref_id) {
29 if ($access->checkAccess('visible', '', $ref_id) || $access->checkAccess('read', '', $ref_id)) {
30 return true;
31 }
32 }
33
34 return false;
35 }
36}
An exception for terminatinating execution or to throw for unit testing.
Class ilContainerAccess.
canBeDelivered(ilWACPath $ilWACPath)
static _getAllReferences($a_id)
get all reference ids of object
Class ilWACPath.
global $DIC
Definition: goto.php:24
Class ilWACCheckingClass.
$results