public function removeAdditionalFolderAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
            return $response;
        }

        $folder_id = \intval($this->getRequest()->request->get('additional_folder_id'));

        if ($folder_id > 0) {
            $event = new ContentRemoveFolderEvent(
                $this->getExistingObject(),
                $folder_id
            );

            try {
                $this->dispatch(TheliaEvents::CONTENT_REMOVE_FOLDER, $event);
            } catch (\Exception $e) {
                return $this->errorPage($e);
            }
        }

        return $this->redirectToEditionTemplate();
    }
public function removeAdditionalFolderAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth($this->resourceCode, array(), AccessManager::UPDATE)) {
            return $response;
        }

        $folder_id = \intval($this->getRequest()->request->get('additional_folder_id'));

        if ($folder_id > 0) {
            $event = new ContentRemoveFolderEvent(
                $this->getExistingObject(),
                $folder_id
            );

            try {
                $this->dispatch(TheliaEvents::CONTENT_REMOVE_FOLDER, $event);
            } catch (\Exception $e) {
                return $this->errorPage($e);
            }
        }

        return $this->redirectToEditionTemplate();
    }
public function removeAdditionalFolderAction ( ) { // Check current user authorization if ( null !== $ response = $ this -> checkAuth ( $ this -> resourceCode , array ( ) , AccessManager :: UPDATE ) ) { return $ response ; } $ folder_id = \ intval ( $ this -> getRequest ( ) -> request -> get ( 'additional_folder_id' ) ) ; if ( $ folder_id > 0 ) { $ event = new ContentRemoveFolderEvent ( $ this -> getExistingObject ( ) , $ folder_id ) ; try { $ this -> dispatch ( TheliaEvents :: CONTENT_REMOVE_FOLDER , $ event ) ; } catch ( \ Exception $ e ) { return $ this -> errorPage ( $ e ) ; } } return $ this -> redirectToEditionTemplate ( ) ; }
controller removing additional folder to a content

@return mixed|\Thelia\Core\HttpFoundation\Response
controller removing additional folder to a content