Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 12 |
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 | $images = OwnerMediafile::getImageFiles(Article::tableName(), $model->id); |
||
65 | |||
66 | return $this->render('view', [ |
||
67 | 'model' => $model, |
||
68 | 'images' => $images |
||
69 | ]); |
||
72 |