src/Kunstmaan/AdminListBundle/Controller/AdminListController.php
protected function doExportAction(AbstractAdminListConfigurator $configurator, $_format, Request $request = null)
    {
        if (!$configurator->canExport()) {
            throw $this->createAccessDeniedException('You do not have sufficient rights to access this page.');
        }

        $em = $this->getEntityManager();

        /* @var AdminList $adminList */
        $adminList = $this->container->get('kunstmaan_adminlist.factory')->createExportList($configurator, $em);
        $adminList->bindRequest($request);

        return $this->container->get('kunstmaan_adminlist.service.export')->getDownloadableResponse($adminList, $_format);
    }
protected function doExportAction(AbstractAdminListConfigurator $configurator, $_format, Request $request = null)
    {
        if (!$configurator->canExport()) {
            throw $this->createAccessDeniedException('You do not have sufficient rights to access this page.');
        }

        $em = $this->getEntityManager();

        /* @var AdminList $adminList */
        $adminList = $this->container->get('kunstmaan_adminlist.factory')->createExportList($configurator, $em);
        $adminList->bindRequest($request);

        return $this->container->get('kunstmaan_adminlist.service.export')->getDownloadableResponse($adminList, $_format);
    }
protected function doExportAction ( AbstractAdminListConfigurator $ configurator , $ _format , Request $ request = null ) { if ( ! $ configurator -> canExport ( ) ) { throw $ this -> createAccessDeniedException ( 'You do not have sufficient rights to access this page.' ) ; } $ em = $ this -> getEntityManager ( ) ; /* @var AdminList $adminList */ $ adminList = $ this -> container -> get ( 'kunstmaan_adminlist.factory' ) -> createExportList ( $ configurator , $ em ) ; $ adminList -> bindRequest ( $ request ) ; return $ this -> container -> get ( 'kunstmaan_adminlist.service.export' ) -> getDownloadableResponse ( $ adminList , $ _format ) ; }
Export a list of Entities

@param AbstractAdminListConfigurator $configurator The adminlist configurator
@param string                        $_format      The format to export to
@param null|Request                  $request

@throws AccessDeniedHttpException

@return Response
Export a list of Entities