Total Complexity | 6 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class SettingController extends ActiveController |
||
9 | { |
||
10 | public $modelClass = Setting::class; |
||
11 | |||
12 | public function actions() |
||
20 | ]; |
||
21 | } |
||
22 | |||
23 | public function searchModel() |
||
24 | { |
||
25 | return (new DynamicModel(['id' => '', 'description' => ''])) |
||
26 | ->addRule(['id', 'description'], 'string'); |
||
27 | } |
||
28 | |||
29 | protected function getQuery($action) |
||
30 | { |
||
31 | return parent::getQuery($action) |
||
32 | ->alias('s') |
||
33 | ->orderBy(['id' => SORT_ASC]); |
||
34 | } |
||
35 | |||
36 | protected function applyFilter($query, $model, $filter) |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 | } |