Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU General Public License |
6 | * as published by the Free Software Foundation; under version 2 |
7 | * of the License (non-upgradable). |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | * Copyright (c) 2015-2023 (original work) Open Assessment Technologies SA. |
19 | */ |
20 | |
21 | namespace oat\taoBackOffice\model\menuStructure; |
22 | |
23 | use oat\tao\model\menu\Icon; |
24 | |
25 | /** |
26 | * Action interface |
27 | */ |
28 | interface Action |
29 | { |
30 | /** |
31 | * context of actions that apply to all resources |
32 | * @var string |
33 | */ |
34 | public const CONTEXT_RESOURCE = 'resource'; |
35 | |
36 | /** |
37 | * context of actions that only apply to classes |
38 | * @var string |
39 | */ |
40 | public const CONTEXT_CLASS = 'class'; |
41 | |
42 | /** |
43 | * context of actions that only apply to instances |
44 | * @var string |
45 | */ |
46 | public const CONTEXT_INSTANCE = 'instance'; |
47 | |
48 | /** |
49 | * Default js binding of actions |
50 | * @var string |
51 | */ |
52 | public const BINDING_DEFAULT = 'load'; |
53 | |
54 | /** |
55 | * Default group to add the action to |
56 | * @var string |
57 | */ |
58 | public const GROUP_DEFAULT = 'tree'; |
59 | |
60 | /** |
61 | * Default value of action weight |
62 | * @var int |
63 | */ |
64 | public const WEIGHT_DEFAULT = 0; |
65 | |
66 | /** |
67 | * @return string Identifier of action |
68 | */ |
69 | public function getId(); |
70 | |
71 | /** |
72 | * @return string Label of the action |
73 | */ |
74 | public function getName(); |
75 | |
76 | /** |
77 | * @return string fully qualified URL of the action |
78 | */ |
79 | public function getUrl(); |
80 | |
81 | /** |
82 | * @return string Java script bindings of action |
83 | */ |
84 | public function getBinding(); |
85 | |
86 | /** |
87 | * @return string Context of the action |
88 | */ |
89 | public function getContext(); |
90 | |
91 | /** |
92 | * @return string Group of the action (where to display) |
93 | */ |
94 | public function getGroup(); |
95 | |
96 | /** |
97 | * @return Icon Icon to be used with action |
98 | */ |
99 | public function getIcon(); |
100 | |
101 | /** |
102 | * Can the action be applied on mulitple resources ? |
103 | * @return boolean |
104 | */ |
105 | public function isMultiple(); |
106 | |
107 | /** |
108 | * Get the permissions required by this actio: |
109 | * @return array |
110 | */ |
111 | public function getRequiredRights(); |
112 | |
113 | /** |
114 | * @return int Weight of the action |
115 | */ |
116 | public function getWeight(); |
117 | } |