@@ 15-48 (lines=34) @@ | ||
12 | * @author Misbahul D Munir <[email protected]> |
|
13 | * @since 1.0 |
|
14 | */ |
|
15 | class PermissionController extends ItemController |
|
16 | { |
|
17 | ||
18 | /** |
|
19 | * @inheritdoc |
|
20 | */ |
|
21 | public function behaviors() |
|
22 | { |
|
23 | return [ |
|
24 | 'access' => [ |
|
25 | 'class' => AccessControl::class, |
|
26 | ], |
|
27 | ]; |
|
28 | } |
|
29 | ||
30 | /** |
|
31 | * @inheritdoc |
|
32 | */ |
|
33 | public function labels() |
|
34 | { |
|
35 | return[ |
|
36 | 'Item' => 'Permission', |
|
37 | 'Items' => 'Permissions', |
|
38 | ]; |
|
39 | } |
|
40 | ||
41 | /** |
|
42 | * @inheritdoc |
|
43 | */ |
|
44 | public function getType() |
|
45 | { |
|
46 | return Item::TYPE_PERMISSION; |
|
47 | } |
|
48 | } |
|
49 |
@@ 15-47 (lines=33) @@ | ||
12 | * @author Misbahul D Munir <[email protected]> |
|
13 | * @since 1.0 |
|
14 | */ |
|
15 | class RoleController extends ItemController |
|
16 | { |
|
17 | /** |
|
18 | * @inheritdoc |
|
19 | */ |
|
20 | public function behaviors() |
|
21 | { |
|
22 | return [ |
|
23 | 'access' => [ |
|
24 | 'class' => AccessControl::class, |
|
25 | ], |
|
26 | ]; |
|
27 | } |
|
28 | ||
29 | /** |
|
30 | * @inheritdoc |
|
31 | */ |
|
32 | public function labels() |
|
33 | { |
|
34 | return[ |
|
35 | 'Item' => 'Role', |
|
36 | 'Items' => 'Roles', |
|
37 | ]; |
|
38 | } |
|
39 | ||
40 | /** |
|
41 | * @inheritdoc |
|
42 | */ |
|
43 | public function getType() |
|
44 | { |
|
45 | return Item::TYPE_ROLE; |
|
46 | } |
|
47 | } |
|
48 |