Commit 4477c9f6033b760f80550e06bdef8d196e470f9f
1 parent
179a0e00
price
Showing
1 changed file
with
9 additions
and
6 deletions
Show diff stats
views/manage/index.php
| ... | ... | @@ -54,12 +54,15 @@ |
| 54 | 54 | 'content' => function (CommentModel $model) { |
| 55 | 55 | $entity = call_user_func($model->entity.'::find'); |
| 56 | 56 | $item = $entity->where(['id' => $model->entity_id])->with(['lang' , 'lang.alias'])->one(); |
| 57 | - if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) { | |
| 58 | - | |
| 59 | - return "<a href='".$urlManagerFrontend->createUrl(Json::decode($item->lang->alias->route))."'>".$item->lang->title."</a>"; | |
| 60 | - } | |
| 61 | - | |
| 62 | - return $item->lang->title; | |
| 57 | + if ($item !== null){ | |
| 58 | + if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) { | |
| 59 | + | |
| 60 | + return "<a href='".$urlManagerFrontend->createUrl(Json::decode($item->lang->alias->route))."'>".$item->lang->title."</a>"; | |
| 61 | + } | |
| 62 | + | |
| 63 | + return $item->lang->title; | |
| 64 | + } | |
| 65 | + return 'Товар удален'; | |
| 63 | 66 | }, |
| 64 | 67 | ], |
| 65 | 68 | [ | ... | ... |