public function renderPageLinks(\JasperClient\Client\Report $report, $route = null) {
        //Set the route to the default if its not set
        $route = $route ?: $this->defaultDisplayPageRoute;

        //Check that the report is in html and has a page and total page number
        if ('html' !== $report->getFormat() || null === $report->getPage() || null === $report->getTotalPages() || null == $route) {
            return '';
        }

        //Generate the urls
        $url = $this->container->get('templating.helper.router')->generate($route, array('page' => '!page!', 'requestId' => $report->getRequestId()));
        $pageLinks = new PageLinkManager();
        $pageLinks->generatePageLinks($url, $report->getPage(), $report->getTotalPages());

        //Render
        return $pageLinks->printLinks();
    }
public function renderPageLinks(\JasperClient\Client\Report $report, $route = null) {
        //Set the route to the default if its not set
        $route = $route ?: $this->defaultDisplayPageRoute;

        //Check that the report is in html and has a page and total page number
        if ('html' !== $report->getFormat() || null === $report->getPage() || null === $report->getTotalPages() || null == $route) {
            return '';
        }

        //Generate the urls
        $url = $this->container->get('templating.helper.router')->generate($route, array('page' => '!page!', 'requestId' => $report->getRequestId()));
        $pageLinks = new PageLinkManager();
        $pageLinks->generatePageLinks($url, $report->getPage(), $report->getTotalPages());

        //Render
        return $pageLinks->printLinks();
    }
public function renderPageLinks ( \ JasperClient \ Client \ Report $ report , $ route = null ) { //Set the route to the default if its not set $ route = $ route ? : $ this -> defaultDisplayPageRoute ; //Check that the report is in html and has a page and total page number if ( 'html' !== $ report -> getFormat ( ) || null === $ report -> getPage ( ) || null === $ report -> getTotalPages ( ) || null == $ route ) { return '' ; } //Generate the urls $ url = $ this -> container -> get ( 'templating.helper.router' ) -> generate ( $ route , array ( 'page' => '!page!' , 'requestId' => $ report -> getRequestId ( ) ) ) ; $ pageLinks = new PageLinkManager ( ) ; $ pageLinks -> generatePageLinks ( $ url , $ report -> getPage ( ) , $ report -> getTotalPages ( ) ) ; //Render return $ pageLinks -> printLinks ( ) ; }
Renders a set of page links for html report views

@param  JasperClient\Client\Report $report Report Object
@param  string                     $route  The route to the action that handles html page loads

@return string                             The rendered output of the report page links
Renders a set of page links for html report views