Пример #1
0
 public function actionDetail()
 {
     $id = intval(\Yii::$app->request->get('id'));
     $detail = Blog::detail($id);
     $this->checkPermission($detail);
     $detail['content'] = htmlspecialchars_decode($detail['content']);
     Blog::readInc($id);
     return $this->render('/site/detail', $detail);
 }
Пример #2
0
 public static function detail($id, array $condition = [])
 {
     return parent::detail($id, ['b.uid' => \Yii::$app->user->getId()]);
 }