public function renderExportLinks(\JasperClient\Client\Report $report, $exportRoute = null) {
        //Determine whether to use the default export route
        $exportRoute = $exportRoute ?: $this->defaultExportRoute;

        //Generate the links for each export type the report is available in
        $exportLinks = array();
        foreach($report->getAvailableFormats() as $format) {
            //Ignore html
            if (self::FORMAT_HTML !== $format) {
                $exportLinks[$format] = $this->container->get('router')
                    ->generate($exportRoute, array('format' => $format, 'requestId' => $report->getRequestId()));
            }
        }

        //Render the partial twig
        return $this->container->get('templating')->render(
            'MesdJasperReportBundle:Report:exportLinks.html.twig', array(
                    'exportLinks' => $exportLinks
                )
            );
    }
public function renderExportLinks(\JasperClient\Client\Report $report, $exportRoute = null) {
        //Determine whether to use the default export route
        $exportRoute = $exportRoute ?: $this->defaultExportRoute;

        //Generate the links for each export type the report is available in
        $exportLinks = array();
        foreach($report->getAvailableFormats() as $format) {
            //Ignore html
            if (self::FORMAT_HTML !== $format) {
                $exportLinks[$format] = $this->container->get('router')
                    ->generate($exportRoute, array('format' => $format, 'requestId' => $report->getRequestId()));
            }
        }

        //Render the partial twig
        return $this->container->get('templating')->render(
            'MesdJasperReportBundle:Report:exportLinks.html.twig', array(
                    'exportLinks' => $exportLinks
                )
            );
    }
public function renderExportLinks ( \ JasperClient \ Client \ Report $ report , $ exportRoute = null ) { //Determine whether to use the default export route $ exportRoute = $ exportRoute ? : $ this -> defaultExportRoute ; //Generate the links for each export type the report is available in $ exportLinks = array ( ) ; foreach ( $ report -> getAvailableFormats ( ) as $ format ) { //Ignore html if ( self :: FORMAT_HTML !== $ format ) { $ exportLinks [ $ format ] = $ this -> container -> get ( 'router' ) -> generate ( $ exportRoute , array ( 'format' => $ format , 'requestId' => $ report -> getRequestId ( ) ) ) ; } } //Render the partial twig return $ this -> container -> get ( 'templating' ) -> render ( 'MesdJasperReportBundle:Report:exportLinks.html.twig' , array ( 'exportLinks' => $ exportLinks ) ) ; }
Renders export links for a report

@param  JasperClient\Client\Report $report      The cached report to generate export links for
@param  string                     $exportRoute Optional override to the default export route

@return string                                  The rendered output
Renders export links for a report