ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
CmdPermissionInterface.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 // or input is
26 // request, user, ctrl (via gui service?)
27
28 // class is used in handleCOmmand of table or getCmd in execute command
29
30 // hasPerm
31 // derives cmdClass/cmd from ctrl
32 // derives id from request, tablecmd?
33 // does not work, when no gui service is passed
34 public function isRequestCommandPermitted(): bool;
35
36 // replaces getCmd from ctrl
37 // does not return a cmd, if permission not given
38 public function getPermittedCommand(): string;
39
40 public function getRequestCommand(): string;
41
42 public function getRequestEntity(): ?CmdEntity;
43
44 public function getRequestNodeId(): int;
45
46 // works without gui being passed
47 public function isCommandPermitted(
48 string $cmd, // derived or from table
49 int $node_id,
50 string $entity,
51 string $entity_id = ""
52 ): bool;
53
54 public function isCommandPermittedMulti(
55 string $cmd, // derived or from table
56 int $node_id,
57 string $entity,
58 array $entity_ids
59 ): bool;
60
61 public function isRequestMultiCommand(): bool;
62
63 public function checkCommand(
64 string $cmd,
65 int $node_id,
66 string $entity,
67 string $entity_id = ""
68 ): void;
69
70 public function isForwardPermitted(
71 string $from_class,
72 string $to_class
73 ): bool;
74
75 public function forwardPermitted(
76 object $from_gui,
77 object $to_gui
78 ): mixed;
79
80
81}
forwardPermitted(object $from_gui, object $to_gui)
checkCommand(string $cmd, int $node_id, string $entity, string $entity_id="")
isCommandPermittedMulti(string $cmd, int $node_id, string $entity, array $entity_ids)
isForwardPermitted(string $from_class, string $to_class)
isCommandPermitted(string $cmd, int $node_id, string $entity, string $entity_id="")