ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjCategoryAccess.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
40 public static function _getCommands(): array
41 {
42 $commands = [];
43 $commands[] = ["permission" => "read", "cmd" => "render", "lang_var" => "show", "default" => true];
44
45
46 // BEGIN WebDAV
48 $webdav_obj = new ilObjWebDAV();
49 $commands[] = $webdav_obj->retrieveWebDAVCommandArrayForActionMenu();
50 }
51 // END WebDAV
52 $commands[] = ["permission" => "write", "cmd" => "enableAdministrationPanel", "lang_var" => "edit_content"];
53 $commands[] = ["permission" => "write", "cmd" => "edit", "lang_var" => "settings"];
54
55 return $commands;
56 }
57
61 public static function _checkGoto(string $target): bool
62 {
63 global $DIC;
64
65 $ilAccess = $DIC->access();
66
67 $t_arr = explode("_", $target);
68
69 if ($t_arr[0] !== "cat" || ((int) $t_arr[1]) <= 0) {
70 return false;
71 }
72
73 if ($ilAccess->checkAccess("read", "", (int) $t_arr[1]) ||
74 $ilAccess->checkAccess("visible", "", (int) $t_arr[1])) {
75 return true;
76 }
77 return false;
78 }
79}
Class ilObjCategoryAccess.
static _checkGoto(string $target)
check whether goto script will succeed
static _getCommands()
get commands
Class ilObjectAccess.
global $DIC
Definition: shib_login.php:26