| Total Complexity | 5 |
| Total Lines | 108 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class FeedbackSearch extends Feedback |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | public $delete_items = []; |
||
| 20 | |||
| 21 | const SCENARIO_DELETE_SELECTED = 'delete_selected'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @inheritdoc |
||
| 25 | */ |
||
| 26 | public function rules() |
||
| 27 | { |
||
| 28 | return [ |
||
| 29 | [ |
||
| 30 | 'read', |
||
| 31 | 'integer', |
||
| 32 | ], |
||
| 33 | [ |
||
| 34 | [ |
||
| 35 | 'name', |
||
| 36 | 'phone', |
||
| 37 | 'subject', |
||
| 38 | ], |
||
| 39 | 'string' |
||
| 40 | ], |
||
| 41 | [ |
||
| 42 | 'email', |
||
| 43 | 'email' |
||
| 44 | ], |
||
| 45 | ]; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @inheritdoc |
||
| 50 | */ |
||
| 51 | public function scenarios() |
||
| 52 | { |
||
| 53 | return ArrayHelper::merge( |
||
| 54 | Model::scenarios(), |
||
| 55 | parent::scenarios(), |
||
| 56 | [ |
||
| 57 | self::SCENARIO_DELETE_SELECTED => ['delete_items'] |
||
| 58 | ] |
||
| 59 | ); |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Creates data provider instance with search query applied |
||
| 64 | * |
||
| 65 | * @param array $params |
||
| 66 | * |
||
| 67 | * @return ActiveDataProvider |
||
| 68 | */ |
||
| 69 | public function search($params) |
||
| 114 | } |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @return int |
||
| 118 | */ |
||
| 119 | public function deleteSelected() |
||
| 122 | } |
||
| 123 | } |
||
| 124 |