private function getDestinationName($destId)
 {
     $destinationTable = new Table\DestinationTable();
     return $destinationTable->getName($destId);
 }
 public function add()
 {
     \Cake\Log\Log::debug("you are in destination add method");
     if ($this->request->is('post')) {
         $data = $this->request->data;
         $destinationTable = new Table\DestinationTable();
         $status = parent::getActive($data['status']);
         if ($destinationTable->addNewDestiantion($data['tilte'], $data['latitude'], $data['longitude'], $status)) {
             echo '<script>alert("Destination added !")</script>';
             $this->redirect(['controller' => 'DestinationForm', 'action' => 'index']);
         } else {
             echo '<script>alert("Unknown Error occured !")</script>';
         }
     }
 }