Example #1
0
 /**
  * Delete a Hotel Type
  */
 public function deleteAction()
 {
     $HotelType = Countries::getById($this->getRequest()->getParam('id'));
     if ($HotelType) {
         if (count($HotelType->City) == 0) {
             if ($this->getRequest()->isPost()) {
                 $HotelType->delete();
                 $this->_redirect($this->_helper->url('index', 'location', 'admin'));
             }
         } else {
             $this->view->notDeleAble = 'Bạn không thể xóa <b>' . $Location->name . '</b> nếu như vẫn còn Thành phố thuộc vùng này';
         }
         $this->view->Location = $HotelType;
     }
 }