Conditions | 7 |
Paths | 9 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
47 | public function search($params) |
||
48 | { |
||
49 | /* @var \yii\rbac\Manager $authManager */ |
||
50 | $authManager = Configs::authManager(); |
||
51 | $models = []; |
||
52 | $included = !($this->load($params) && $this->validate() && trim($this->name) !== ''); |
||
53 | foreach ($authManager->getRules() as $name => $item) { |
||
54 | if ($name != RouteRule::RULE_NAME && ($included || stripos($item->name, $this->name) !== false)) { |
||
55 | $models[$name] = new MBizRule($item); |
||
56 | } |
||
57 | } |
||
58 | |||
59 | return new ArrayDataProvider([ |
||
60 | 'allModels' => $models, |
||
61 | ]); |
||
64 |