public function actionDelete($id) { $item = Map::findByPK($id); if ($item) { $item->delete(); } $this->redirect('/admin/maps'); }
public function actionMaps($id) { $map = Map::findByPK($id); $this->data->map = $map; if (empty($this->data->map)) { throw new E404Exception(); } }