src/Controller/PageHistoricController.php
public function deletePageHistoricAction() 
    {
        $responseData = $this->params()->fromRoute('datas', $this->params()->fromQuery('datas', ''));

        $idPage       = $responseData[0]['idPage'];

        $response = array('idPage' => $idPage);
        $this->getEventManager()->trigger('meliscmspagehistoric_historic_delete_start', $this, $response);
        
    	$melisPageHistoricTable = $this->getServiceLocator()->get('MelisPageHistoricTable');
    	

    	$melisCoreAuth = $this->getServiceLocator()->get('MelisCoreAuth');

    	$userId = (int) null;
        $userAuthDatas =  $melisCoreAuth->getStorage()->read();
    	if($userAuthDatas)
    	   $userId = $userAuthDatas->usr_id;
    	    	     
        $histDatas = array(
            'hist_page_id' => $idPage,
    	    'hist_action'  => 'Delete',
            'hist_date'     => date('Y-m-d H:i:s'),
    	    'hist_user_id' => $userId,
    	    'hist_description' => 'tr_melispagehistoric_action_text_Delete' 
        );
        $melisPageHistoricTable->save($histDatas);
    	
        $this->getEventManager()->trigger('meliscmspagehistoric_historic_delete_end', $this, $responseData);
    }
public function deletePageHistoricAction() 
    {
        $responseData = $this->params()->fromRoute('datas', $this->params()->fromQuery('datas', ''));

        $idPage       = $responseData[0]['idPage'];

        $response = array('idPage' => $idPage);
        $this->getEventManager()->trigger('meliscmspagehistoric_historic_delete_start', $this, $response);
        
    	$melisPageHistoricTable = $this->getServiceLocator()->get('MelisPageHistoricTable');
    	

    	$melisCoreAuth = $this->getServiceLocator()->get('MelisCoreAuth');

    	$userId = (int) null;
        $userAuthDatas =  $melisCoreAuth->getStorage()->read();
    	if($userAuthDatas)
    	   $userId = $userAuthDatas->usr_id;
    	    	     
        $histDatas = array(
            'hist_page_id' => $idPage,
    	    'hist_action'  => 'Delete',
            'hist_date'     => date('Y-m-d H:i:s'),
    	    'hist_user_id' => $userId,
    	    'hist_description' => 'tr_melispagehistoric_action_text_Delete' 
        );
        $melisPageHistoricTable->save($histDatas);
    	
        $this->getEventManager()->trigger('meliscmspagehistoric_historic_delete_end', $this, $responseData);
    }
public function deletePageHistoricAction ( ) { $ responseData = $ this -> params ( ) -> fromRoute ( 'datas' , $ this -> params ( ) -> fromQuery ( 'datas' , '' ) ) ; $ idPage = $ responseData [ 0 ] [ 'idPage' ] ; $ response = array ( 'idPage' => $ idPage ) ; $ this -> getEventManager ( ) -> trigger ( 'meliscmspagehistoric_historic_delete_start' , $ this , $ response ) ; $ melisPageHistoricTable = $ this -> getServiceLocator ( ) -> get ( 'MelisPageHistoricTable' ) ; $ melisCoreAuth = $ this -> getServiceLocator ( ) -> get ( 'MelisCoreAuth' ) ; $ userId = ( int ) null ; $ userAuthDatas = $ melisCoreAuth -> getStorage ( ) -> read ( ) ; if ( $ userAuthDatas ) $ userId = $ userAuthDatas -> usr_id ; $ histDatas = array ( 'hist_page_id' => $ idPage , 'hist_action' => 'Delete' , 'hist_date' => date ( 'Y-m-d H:i:s' ) , 'hist_user_id' => $ userId , 'hist_description' => 'tr_melispagehistoric_action_text_Delete' ) ; $ melisPageHistoricTable -> save ( $ histDatas ) ; $ this -> getEventManager ( ) -> trigger ( 'meliscmspagehistoric_historic_delete_end' , $ this , $ responseData ) ; }
Removes page historic entries
Removes page historic entries