예제 #1
0
파일: Index.php 프로젝트: scorp7mix/try.t4
 public function actionOne($id)
 {
     $this->data->item = Story::findByPK($id);
     if (empty($this->data->item)) {
         throw new E404Exception('Новость не найдена');
     }
 }
예제 #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;
     }
 }
예제 #3
0
 public function actionSlaider($id)
 {
     $this->data->items = Story::FindByPk($id);
 }