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