19 declare(strict_types=1);
36 array(
"permission" =>
"read",
41 array(
"permission" =>
"read",
42 "cmd" =>
"exportHTML",
43 "lang_var" =>
"export_html" 45 array(
"permission" =>
"write",
47 "lang_var" =>
"edit_content" 49 array(
"permission" =>
"write",
51 "lang_var" =>
"settings" 60 $ilAccess = $DIC->access();
62 $t_arr = explode(
"_", $target);
63 $type = $t_arr[0] ??
'';
66 if ($type !==
'webr' ||
$ref_id <= 0) {
69 return $ilAccess->checkAccess(
'read',
'',
$ref_id) ||
70 $ilAccess->checkAccess(
'visible',
'',
$ref_id);
81 $rbacsystem = $DIC->rbac()->system();
85 if ($permission ==
'read') {
86 if (!$web_link_repo->getAllItemsAsContainer(
true)
88 !$rbacsystem->checkAccessOfUser(
96 return parent::_checkAccess(
111 if (isset(self::$item[$a_webr_id])) {
112 return self::$item[$a_webr_id];
117 $current_item = $web_link_repo->getAllItemsAsContainer(
true)
120 self::$item[$current_item->getWebrId()] = $current_item;
122 return $current_item;
125 public static function _preloadData(array $obj_ids, array $ref_ids): void
127 foreach ($obj_ids as
$id) {
129 $first_item = $web_link_repo->getAllItemsAsContainer(
true)
131 self::$item[
$id] = $first_item;
141 if (isset(self::$single_link[$a_obj_id])) {
142 return self::$single_link[$a_obj_id];
147 return self::$single_link[$a_obj_id] = $web_link_repo->doesOnlyOneItemExist(
true);
static array $single_link
_checkAccess(string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
static _checkDirectLink($a_obj_id)
Check whether there is only one active link in the web resource.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _preloadData(array $obj_ids, array $ref_ids)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Class ilObjLinkResourceAccess.
static _getFirstLink(int $a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one...
Immutable class for Web Link items.
static _checkGoto(string $target)