public function deleteEventAction(){
        $translator = $this->getServiceLocator()->get('translator');
        
        $request = $this->getRequest();
        // Default Values
        $id = null;
        $status  = 0;
        $textMessage = '';
        $errors  = array();
        $textMessage = '';
        $textTitle = '';
         
        if($request->isPost()) {
             
            $postValues = get_object_vars($request->getPost());
             
            if (!empty($postValues)){
                 
                $calendarService = $this->getServiceLocator()->get('MelisCalendarService');
                $id = $responseData = $calendarService->deleteCalendarEvent($postValues);
                if (!is_null($id)){
                    $textMessage = 'tr_melistoolcalendar_delete_event_success';
                    $status  = 1;
                }else{
                    $textMessage = 'tr_melistoolcalendar_delete_event_unable';
                }
            }
        }
         
        $response = array(
            'success' => $status,
            'textTitle' => 'tr_melistoolcalendar_delete_event_title',
            'textMessage' => $textMessage,
            'errors' => $errors,
        );
        
        if ($status){
            $this->getEventManager()->trigger('meliscalendar_save_event_end', $this, array_merge($response, array('typeCode' => 'CALENDAR_EVENT_DELETE', 'itemId' => $id)));
        }
         
        return new JsonModel($response);
    }
public function deleteEventAction(){
        $translator = $this->getServiceLocator()->get('translator');
        
        $request = $this->getRequest();
        // Default Values
        $id = null;
        $status  = 0;
        $textMessage = '';
        $errors  = array();
        $textMessage = '';
        $textTitle = '';
         
        if($request->isPost()) {
             
            $postValues = get_object_vars($request->getPost());
             
            if (!empty($postValues)){
                 
                $calendarService = $this->getServiceLocator()->get('MelisCalendarService');
                $id = $responseData = $calendarService->deleteCalendarEvent($postValues);
                if (!is_null($id)){
                    $textMessage = 'tr_melistoolcalendar_delete_event_success';
                    $status  = 1;
                }else{
                    $textMessage = 'tr_melistoolcalendar_delete_event_unable';
                }
            }
        }
         
        $response = array(
            'success' => $status,
            'textTitle' => 'tr_melistoolcalendar_delete_event_title',
            'textMessage' => $textMessage,
            'errors' => $errors,
        );
        
        if ($status){
            $this->getEventManager()->trigger('meliscalendar_save_event_end', $this, array_merge($response, array('typeCode' => 'CALENDAR_EVENT_DELETE', 'itemId' => $id)));
        }
         
        return new JsonModel($response);
    }
public function deleteEventAction ( ) { $ translator = $ this -> getServiceLocator ( ) -> get ( 'translator' ) ; $ request = $ this -> getRequest ( ) ; // Default Values $ id = null ; $ status = 0 ; $ textMessage = '' ; $ errors = array ( ) ; $ textMessage = '' ; $ textTitle = '' ; if ( $ request -> isPost ( ) ) { $ postValues = get_object_vars ( $ request -> getPost ( ) ) ; if ( ! empty ( $ postValues ) ) { $ calendarService = $ this -> getServiceLocator ( ) -> get ( 'MelisCalendarService' ) ; $ id = $ responseData = $ calendarService -> deleteCalendarEvent ( $ postValues ) ; if ( ! is_null ( $ id ) ) { $ textMessage = 'tr_melistoolcalendar_delete_event_success' ; $ status = 1 ; } else { $ textMessage = 'tr_melistoolcalendar_delete_event_unable' ; } } } $ response = array ( 'success' => $ status , 'textTitle' => 'tr_melistoolcalendar_delete_event_title' , 'textMessage' => $ textMessage , 'errors' => $ errors , ) ; if ( $ status ) { $ this -> getEventManager ( ) -> trigger ( 'meliscalendar_save_event_end' , $ this , array_merge ( $ response , array ( 'typeCode' => 'CALENDAR_EVENT_DELETE' , 'itemId' => $ id ) ) ) ; } return new JsonModel ( $ response ) ; }
Deleting Calendar item event

@return \Zend\View\Model\JsonModel
Deleting Calendar item event