| Total Complexity | 6 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ArticleCommentController extends ActiveController |
||
| 8 | { |
||
| 9 | public $modelClass = ArticleComment::class; |
||
| 10 | |||
| 11 | public function behaviors() |
||
| 12 | { |
||
| 13 | $behaviors = parent::behaviors(); |
||
| 14 | |||
| 15 | $behaviors['authenticator']['optional'] = ['options', 'index']; |
||
| 16 | |||
| 17 | return $behaviors; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getQuery($action) |
||
| 21 | { |
||
| 22 | return parent::getQuery($action) |
||
| 23 | ->alias('a') |
||
| 24 | ->orderBy([ |
||
| 25 | 'a.create_time' => SORT_DESC |
||
| 26 | ]) |
||
| 27 | ->andWhere([ |
||
| 28 | 'a.is_deleted' => 0, |
||
| 29 | ]); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function searchModel() |
||
| 36 | } |
||
| 37 | |||
| 38 | protected function applyFilter($query, $model, $filter) |
||
| 43 | } |
||
| 44 | } |
||
| 47 |