Example #1
0
 public function actionOne($id)
 {
     $this->data->item = Story::findByPK($id);
     if (empty($this->data->item)) {
         throw new E404Exception('Новость не найдена');
     }
 }
Example #2
0
 public function actionDeleteImage($id)
 {
     $item = Story::findByPK($id);
     if ($item) {
         $item->deleteImage();
         $item->save();
         $this->data->result = true;
     } else {
         $this->data->result = false;
     }
 }
Example #3
0
 public function actionSlaider($id)
 {
     $this->data->items = Story::FindByPk($id);
 }