public function removePageSessionPluginAction()
    {
        $module = $this->getRequest()->getQuery('module', null);
        $pluginName = $this->getRequest()->getQuery('pluginName', '');
        $pageId = $this->getRequest()->getQuery('pageId', null);
        $pluginId = $this->getRequest()->getQuery('pluginId', null);
        $pluginTag = $this->getRequest()->getQuery('pluginTag', null);
        
        $parameters = array(
            'module' => $module,
            'pluginName' => $pluginName,
            'pageId' => $pageId,
            'pluginId' => $pluginId,
            'pluginTag' => $pluginTag,
        );
        
        $translator = $this->serviceLocator->get('translator');

        if (empty($module) || empty($pluginName) || empty($pageId) || empty($pluginId))
        {

            $result = array(
                'success' => 0,
                'errors' => array(array('empty' => $translator->translate('tr_meliscms_form_common_errors_Empty datas')))
            );
        }
        else
        {

            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_start', null, $parameters);
            
            // removing plugin from session
            $container = new Container('meliscms');
            if (!empty($container['content-pages'][$pageId][$pluginTag][$pluginId]))
                unset($container['content-pages'][$pageId][$pluginTag][$pluginId]);
            
            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_end', null, $parameters);
            
            $result = array(
                'success' => 1,
                'errors' => array()
            );
        }
         
        return new JsonModel($result);
    }
public function removePageSessionPluginAction()
    {
        $module = $this->getRequest()->getQuery('module', null);
        $pluginName = $this->getRequest()->getQuery('pluginName', '');
        $pageId = $this->getRequest()->getQuery('pageId', null);
        $pluginId = $this->getRequest()->getQuery('pluginId', null);
        $pluginTag = $this->getRequest()->getQuery('pluginTag', null);
        
        $parameters = array(
            'module' => $module,
            'pluginName' => $pluginName,
            'pageId' => $pageId,
            'pluginId' => $pluginId,
            'pluginTag' => $pluginTag,
        );
        
        $translator = $this->serviceLocator->get('translator');

        if (empty($module) || empty($pluginName) || empty($pageId) || empty($pluginId))
        {

            $result = array(
                'success' => 0,
                'errors' => array(array('empty' => $translator->translate('tr_meliscms_form_common_errors_Empty datas')))
            );
        }
        else
        {

            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_start', null, $parameters);
            
            // removing plugin from session
            $container = new Container('meliscms');
            if (!empty($container['content-pages'][$pageId][$pluginTag][$pluginId]))
                unset($container['content-pages'][$pageId][$pluginTag][$pluginId]);
            
            $this->getEventManager()->trigger('meliscms_page_removesession_plugin_end', null, $parameters);
            
            $result = array(
                'success' => 1,
                'errors' => array()
            );
        }
         
        return new JsonModel($result);
    }
public function removePageSessionPluginAction ( ) { $ module = $ this -> getRequest ( ) -> getQuery ( 'module' , null ) ; $ pluginName = $ this -> getRequest ( ) -> getQuery ( 'pluginName' , '' ) ; $ pageId = $ this -> getRequest ( ) -> getQuery ( 'pageId' , null ) ; $ pluginId = $ this -> getRequest ( ) -> getQuery ( 'pluginId' , null ) ; $ pluginTag = $ this -> getRequest ( ) -> getQuery ( 'pluginTag' , null ) ; $ parameters = array ( 'module' => $ module , 'pluginName' => $ pluginName , 'pageId' => $ pageId , 'pluginId' => $ pluginId , 'pluginTag' => $ pluginTag , ) ; $ translator = $ this -> serviceLocator -> get ( 'translator' ) ; if ( empty ( $ module ) || empty ( $ pluginName ) || empty ( $ pageId ) || empty ( $ pluginId ) ) { $ result = array ( 'success' => 0 , 'errors' => array ( array ( 'empty' => $ translator -> translate ( 'tr_meliscms_form_common_errors_Empty datas' ) ) ) ) ; } else { $ this -> getEventManager ( ) -> trigger ( 'meliscms_page_removesession_plugin_start' , null , $ parameters ) ; // removing plugin from session $ container = new Container ( 'meliscms' ) ; if ( ! empty ( $ container [ 'content-pages' ] [ $ pageId ] [ $ pluginTag ] [ $ pluginId ] ) ) unset ( $ container [ 'content-pages' ] [ $ pageId ] [ $ pluginTag ] [ $ pluginId ] ) ; $ this -> getEventManager ( ) -> trigger ( 'meliscms_page_removesession_plugin_end' , null , $ parameters ) ; $ result = array ( 'success' => 1 , 'errors' => array ( ) ) ; } return new JsonModel ( $ result ) ; }
Remove a specific plugin from a pageId
Save is made in SESSION.

@return \Zend\View\Model\JsonModel
Remove a specific plugin from a pageId Save is made in SESSION .