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