1 | <?php |
||
24 | class RoleResource extends BasicEntity |
||
25 | { |
||
26 | /** |
||
27 | * View permission. |
||
28 | * |
||
29 | * @ORM\Column(name="view", type="boolean") |
||
30 | */ |
||
31 | private $view = true; |
||
32 | |||
33 | /** |
||
34 | * Insert permission. |
||
35 | * |
||
36 | * @ORM\Column(name="`insert`", type="boolean") |
||
37 | */ |
||
38 | private $insert = false; |
||
39 | |||
40 | /** |
||
41 | * Edit permission. |
||
42 | * |
||
43 | * @ORM\Column(name="edit", type="boolean") |
||
44 | */ |
||
45 | private $edit = false; |
||
46 | |||
47 | /** |
||
48 | * Delete permission. |
||
49 | * |
||
50 | * @ORM\Column(name="`delete`", type="boolean") |
||
51 | */ |
||
52 | private $delete = false; |
||
53 | |||
54 | /** |
||
55 | * Resource object. |
||
56 | * |
||
57 | * @ORM\ManyToOne(targetEntity="Resource", fetch="EAGER") |
||
58 | * @ORM\JoinColumn(name="resource_id", referencedColumnName="id", nullable=true, onDelete="CASCADE") |
||
59 | **/ |
||
60 | private $resource; |
||
61 | |||
62 | /** |
||
63 | * Role object. |
||
64 | * |
||
65 | * @ORM\ManyToOne(targetEntity="Role", inversedBy="resources") |
||
66 | **/ |
||
67 | private $role; |
||
68 | |||
69 | /** |
||
70 | * Check whether role resource has a permission. |
||
71 | * |
||
72 | * @param [type] $attribute [description] |
||
|
|||
73 | 30 | * |
|
74 | * @return boolean|null [description] |
||
75 | */ |
||
76 | 30 | public function isGranted($attribute) |
|
100 | |||
101 | /** |
||
102 | * Gets the value of view. |
||
103 | 4 | * |
|
104 | * @return boolean |
||
105 | 4 | */ |
|
106 | public function getView() |
||
110 | |||
111 | /** |
||
112 | * Sets the value of view. |
||
113 | * |
||
114 | * @param mixed $view the view |
||
115 | 1 | * |
|
116 | * @return self |
||
117 | 1 | */ |
|
118 | public function setView($view) |
||
124 | |||
125 | /** |
||
126 | * Gets the value of edit. |
||
127 | 4 | * |
|
128 | * @return boolean |
||
129 | 4 | */ |
|
130 | public function getEdit() |
||
134 | |||
135 | /** |
||
136 | * Sets the value of edit. |
||
137 | * |
||
138 | * @param boolean $edit the edit |
||
139 | 49 | * |
|
140 | * @return self |
||
141 | 49 | */ |
|
142 | public function setEdit($edit) |
||
148 | |||
149 | /** |
||
150 | * Gets the value of delete. |
||
151 | 4 | * |
|
152 | * @return boolean |
||
153 | 4 | */ |
|
154 | public function getDelete() |
||
158 | |||
159 | /** |
||
160 | * Sets the value of delete. |
||
161 | * |
||
162 | * @param boolean $delete the delete |
||
163 | 49 | * |
|
164 | * @return self |
||
165 | 49 | */ |
|
166 | public function setDelete($delete) |
||
172 | |||
173 | /** |
||
174 | * Gets the value of resource. |
||
175 | 31 | * |
|
176 | * @return mixed |
||
177 | 31 | */ |
|
178 | public function getResource() |
||
182 | |||
183 | /** |
||
184 | * Sets the value of resource. |
||
185 | * |
||
186 | * @param mixed $resource the resource |
||
187 | 49 | * |
|
188 | * @return self |
||
189 | 49 | */ |
|
190 | public function setResource($resource) |
||
196 | |||
197 | /** |
||
198 | * Gets the value of role. |
||
199 | 3 | * |
|
200 | * @return mixed |
||
201 | 3 | */ |
|
202 | public function getRole() |
||
206 | |||
207 | /** |
||
208 | * Sets the value of role. |
||
209 | * |
||
210 | * @param mixed $role the role |
||
211 | 49 | * |
|
212 | * @return self |
||
213 | 49 | */ |
|
214 | public function setRole($role) |
||
220 | |||
221 | /** |
||
222 | * Gets the Insert permission. |
||
223 | 3 | * |
|
224 | * @return boolean |
||
225 | 3 | */ |
|
226 | public function getInsert() |
||
230 | |||
231 | /** |
||
232 | * Sets the Insert permission. |
||
233 | * |
||
234 | * @param boolean $insert the insert |
||
235 | 49 | * |
|
236 | * @return self |
||
237 | 49 | */ |
|
238 | public function setInsert($insert) |
||
244 | } |
||
245 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.