@@ -14,6 +14,9 @@ class AppRoleManager extends AbstractAppManager
14
14
{
15
15
private bool $ permissionsDefined = false ;
16
16
17
+ /**
18
+ * @var array<mixed> $permissions
19
+ */
17
20
private array $ permissions = [];
18
21
19
22
public function getByName (string $ name ): ?AppRoleModel
@@ -42,6 +45,10 @@ public function getByName(string $name): ?AppRoleModel
42
45
return $ roleModel ;
43
46
}
44
47
48
+ /**
49
+ * @param array<mixed>|null $query
50
+ * @return array<mixed>
51
+ */
45
52
public function getAll (?array $ query = []): array
46
53
{
47
54
$ query ['size ' ] = 1000 ;
@@ -129,6 +136,9 @@ public function deletePermissionsByRoleName(string $name): CallResponseModel
129
136
return $ this ->callManager ->call ($ callRequest );
130
137
}
131
138
139
+ /**
140
+ * @return array<mixed>
141
+ */
132
142
public function getPermissionsByUser (UserInterface $ user ): array
133
143
{
134
144
if (false === $ this ->permissionsDefined ) {
@@ -150,6 +160,9 @@ public function getPermissionsByUser(UserInterface $user): array
150
160
return $ this ->permissions ;
151
161
}
152
162
163
+ /**
164
+ * @return array<mixed>
165
+ */
153
166
public function getPermissionsByRole (string $ role ): array
154
167
{
155
168
$ permissions = [];
@@ -200,6 +213,9 @@ public function setPermission(AppRoleModel $roleModel, string $module, string $p
200
213
return $ this ->callManager ->call ($ callRequest );
201
214
}
202
215
216
+ /**
217
+ * @return array<string>
218
+ */
203
219
public function selectRoles (): array
204
220
{
205
221
$ callRequest = new CallRequestModel ();
@@ -221,6 +237,9 @@ public function selectRoles(): array
221
237
return $ roles ;
222
238
}
223
239
240
+ /**
241
+ * @return array<mixed>
242
+ */
224
243
public function getAttributes (): array
225
244
{
226
245
$ attributes = $ this ->getAttributesRaw ();
@@ -233,13 +252,19 @@ public function getAttributes(): array
233
252
return $ attributes ;
234
253
}
235
254
255
+ /**
256
+ * @return array<mixed>
257
+ */
236
258
public function getAttributesByModule (string $ module ): array
237
259
{
238
260
$ attributes = $ this ->getAttributesRaw ();
239
261
240
262
return $ attributes [$ module ] ?? [];
241
263
}
242
264
265
+ /**
266
+ * @return array<mixed>
267
+ */
243
268
public function getAttributesRaw (): array
244
269
{
245
270
$ attributes = [
0 commit comments