1 | <?php |
||
2 | |||
3 | namespace Itstructure\RbacModule\models; |
||
4 | |||
5 | use yii\data\ArrayDataProvider; |
||
6 | |||
7 | /** |
||
8 | * Class PermissionSearch |
||
9 | * |
||
10 | * @package Itstructure\RbacModule\models |
||
11 | */ |
||
12 | class PermissionSearch extends Permission |
||
13 | { |
||
14 | /** |
||
15 | * Modify for custom search rules. |
||
16 | * |
||
17 | * @inheritdoc |
||
18 | */ |
||
19 | public function rules() |
||
20 | { |
||
21 | return []; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * Creates data provider |
||
26 | * |
||
27 | * @param array $params |
||
28 | * |
||
29 | * @return ArrayDataProvider |
||
30 | */ |
||
31 | public function search($params) |
||
0 ignored issues
–
show
|
|||
32 | { |
||
33 | $allModels = $this->authManager->getPermissions(); |
||
34 | |||
35 | $dataProvider = new ArrayDataProvider([ |
||
36 | 'allModels' => $allModels, |
||
37 | ]); |
||
38 | |||
39 | /** |
||
40 | * Modify for custom search conditions. |
||
41 | * |
||
42 | $this->load($params); |
||
43 | |||
44 | if (!$this->validate()) { |
||
45 | return $dataProvider; |
||
46 | }*/ |
||
47 | |||
48 | return $dataProvider; |
||
49 | } |
||
50 | } |
||
51 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.