protected function buildPaginatedRoute(Route $route, $name)
    {
        $contentType = $route->getContent();
        $contents    = $this->app['content_repository']->listContents($contentType);
        $paginator   = new Paginator($contents, $route->getPerPage());

        $this->logger->log(sprintf(
            'Building route <comment>%s</comment> for <info>%s</info> pages',
            $name,
            $paginator->count()
        ));
        $this->logger->getProgress($paginator->count());
        $this->logger->start();

        foreach ($paginator as $index => $contents) {
            $this->builder->build($route, $name, ['page' => $index + 1]);
            $this->logger->advance();
        }

        $this->logger->finish();
    }
protected function buildPaginatedRoute(Route $route, $name)
    {
        $contentType = $route->getContent();
        $contents    = $this->app['content_repository']->listContents($contentType);
        $paginator   = new Paginator($contents, $route->getPerPage());

        $this->logger->log(sprintf(
            'Building route <comment>%s</comment> for <info>%s</info> pages',
            $name,
            $paginator->count()
        ));
        $this->logger->getProgress($paginator->count());
        $this->logger->start();

        foreach ($paginator as $index => $contents) {
            $this->builder->build($route, $name, ['page' => $index + 1]);
            $this->logger->advance();
        }

        $this->logger->finish();
    }
protected function buildPaginatedRoute ( Route $ route , $ name ) { $ contentType = $ route -> getContent ( ) ; $ contents = $ this -> app [ 'content_repository' ] -> listContents ( $ contentType ) ; $ paginator = new Paginator ( $ contents , $ route -> getPerPage ( ) ) ; $ this -> logger -> log ( sprintf ( 'Building route <comment>%s</comment> for <info>%s</info> pages' , $ name , $ paginator -> count ( ) ) ) ; $ this -> logger -> getProgress ( $ paginator -> count ( ) ) ; $ this -> logger -> start ( ) ; foreach ( $ paginator as $ index => $ contents ) { $ this -> builder -> build ( $ route , $ name , [ 'page' => $ index + 1 ] ) ; $ this -> logger -> advance ( ) ; } $ this -> logger -> finish ( ) ; }
Build paginated route

@param Route $route
@param string $name
Build paginated route