| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function actionView($alias) |
||
| 51 | { |
||
| 52 | $model = Article::find()->where([ |
||
| 53 | 'alias' => $alias |
||
| 54 | ])->andWhere([ |
||
| 55 | 'active' => 1 |
||
| 56 | ])->one(); |
||
| 57 | |||
| 58 | if (null === $model) { |
||
| 59 | throw new NotFoundHttpException('Article not fount with alias = '.$alias.'.'); |
||
| 60 | } |
||
| 61 | |||
| 62 | $this->setMetaParams($model); |
||
|
|
|||
| 63 | |||
| 64 | return $this->render('view', [ |
||
| 65 | 'model' => $model |
||
| 66 | ]); |
||
| 69 |