Shows a list of productions.

@param Request            $request   The incoming request.
@param PaginatorInterface $paginator The paginator service.

@return Response The rendered response.
979162
public function indexAction(
        Request $request,
        PaginatorInterface $paginator
    ): Response {
        // Get the production repo.
        $repo = $this->em->getRepository(Production::class);
        $query = $repo->findAllOpenQuery();

        // Paginate and render the list of productions.
        $productions = $paginator->paginate($query, $request->query->getInt('page', 1));

        return new Response($this->templating->render('@BkstgCore/ProductionAdmin/index.html.twig', [
            'productions' => $productions,
        ]));
    }
1054969
public function setPaginator(PaginatorInterface $paginator) {
		$this->_paginator = $paginator;
		$this->_pageParam = $paginator->getPageParam();
		
		return $this;
	}
612656
public function dashboard(Request $request, PaginatorInterface $paginator)
    {
        $this->denyAccessUnlessGranted('c975LPayment-dashboard', null);

        //Pagination
        $payments = $paginator->paginate(
            $this->paymentService->getAll(),
            $request->query->getInt('p', 1),
            50
        );

        //Renders the dashboard
        return $this->render('@c975LPayment/pages/dashboard.html.twig', array(
            'payments' => $payments,
        ));
    }
856770
public function listAction($entity, Request $request)
    {
        $entityConfig = $this->get('lin3s_admin.configuration.factory.entity')->createFor($entity);
        $repository = $this->get($entityConfig->repositoryServiceId());
        $entities = $repository->findByRequest($request, $entityConfig);
        $totalCount = $repository->countAll($request, $entityConfig);

        return $this->render('@Lin3sAdmin/Admin/list.html.twig', [
            'entities'     => $entities,
            'entityConfig' => $entityConfig,
            'totalCount'   => $totalCount,
        ]);
    }
508002
public function findAndPaginateDeletes(Request $request)
    {
        return $this->getModel()
                    ->onlyTrashed()
                    ->titulo($request->get('titulo'))
                    ->orderBy('deleted_at', 'desc')
                    ->paginate();
    }
845511
public function index(PageRequest $request)
    {
        return $this->repository
            ->setPresenter(\Litecms\Page\Repositories\Presenter\PageListPresenter::class)
            ->paginate();
    }
769789
public function page(Request $request, Application $app, Paginator $paginator)
    {
        return array_merge(
            ['pages' => count($paginator)],
            $this->extractViewParameters($request, ['app', 'paginator'])
        );
    }
390959
public function listAction(Request $request)
    {
        $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Storage');
        // response was not modified for this request
        if ($response->isNotModified($request)) {
            return $response;
        }

        /* @var $rep StorageRepository */
        $rep = $this->getDoctrine()->getRepository('AnimeDbCatalogBundle:Storage');

        return $this->render('AnimeDbCatalogBundle:Storage:list.html.twig', [
            'storages' => $rep->getList(),
        ], $response);
    }
909197
public function getCollectionAction(Request $request, $start, $count)
    {
        $mediafolder = null;
        $folderUid = $request->get('mediaFolder_uid', null);

        if (null === $folderUid) {
            $mediafolder = $this->getMediaFolderRepository()->getRoot();
        } else {
            $mediafolder = $this->getMediaFolderRepository()->find($folderUid);
        }

        if (null === $mediafolder) {
            throw new NotFoundHttpException('Cannot find a media folder');
        }

        $paginator = null;

        if ($request->query->has('content_uid')) {
            $paginator = $this->getCollectionByContent($request->query->get('content_uid'), $mediafolder);
        } else {
            $paginator = $this->getClassicCollection($request, $mediafolder, $start, $count);
        }

        $iterator = $paginator->getIterator();
        $results = [];
        while ($iterator->valid()) {

            if($this->isGranted('VIEW', $iterator->current()->getMediaFolder())){

                $results[] = $iterator->current();
            }

            $iterator->next();
        }

        $pager = $request->query->has('usePagination') ? $paginator : null;

        return $this->addRangeToContent(
            $this->createJsonResponse($this->mediaToJson($results)),
            $pager,
            $start,
            count($results)
        );
    }
595788
public function listAction(Request $request)
    {
        list($transUnits, $count) = $this->get('lexik_translation.data_grid.request_handler')->getPage($request);

        return $this->get('lexik_translation.data_grid.formatter')->createListResponse($transUnits, $count);
    }
624031
public function paginate(
        \Twig_Environment $twig,
        PaginatorInterface $paginator,
        string $template = '@Core/pagination/default.html.twig'
    ) {
        return $twig->render($template, array(
            'available_pages' => $paginator->getAvailablePages(),
            'current_page' => $paginator->getCurrentPage(),
            'next_url' => $this->getNextUrl($paginator),
            'previous_url' => $this->getPreviousUrl($paginator),
            'route' => $this->getRoute(),
            'params' => $this->getMergedParams(),
        ));
    }
1309543
public function index(Request $request)
    {
        $features = $this->service->paginated();
        return view('admin.features.index')->with('features', $features);
    }
39857
public function indexAction(Request $request)
    {
        $channel = $this->getSelectedChannel();

        $builder = $this->getDocumentManager()->createQueryBuilder(ContentTypePage::class)
            ->field('channel.$id')->equals($channel->getId());

        $pagination = $this->getPaginator()->paginate(
            $builder,
            $request->query->get('page', 1),
            20
        );

        return [
            'pages' => $pagination,
            'channels' => $this->getChannels(),
            'selectedChannel' => $channel,
        ];
    }
1089263
public function listAction(Request $request): Response
    {
        $page = $request->query->get('page', 1);

        $pagerfanta = new Pagerfanta(
            new BookmarkAdapter($this->bookmarkService, $this->datasetFactory)
        );

        $pagerfanta->setMaxPerPage($this->defaultPaginationLimit);
        $pagerfanta->setCurrentPage(min($page, $pagerfanta->getNbPages()));

        $editForm = $this->formFactory->contentEdit(
            new ContentEditData()
        );

        $removeBookmarkForm = $this->formFactory->removeBookmark(
            new BookmarkRemoveData($this->getChoices($pagerfanta->getCurrentPageResults()))
        );

        return $this->render(
            '@ezdesign/admin/bookmark/list.html.twig',
            $viewParameters = [
                'pager' => $pagerfanta,
                'form_edit' => $editForm->createView(),
                'form_remove' => $removeBookmarkForm->createView(),
            ]
        );
    }
1283598
public function listAction(Request $request): Response
    {
        $page = $request->query->get('page') ?? 1;

        $pagerfanta = new Pagerfanta(
            new ArrayAdapter($this->languageService->loadLanguages())
        );

        $pagerfanta->setMaxPerPage($this->defaultPaginationLimit);
        $pagerfanta->setCurrentPage(min($page, $pagerfanta->getNbPages()));

        /** @var Language[] $languageList */
        $languageList = $pagerfanta->getCurrentPageResults();

        $deleteLanguagesForm = $this->formFactory->deleteLanguages(
            new LanguagesDeleteData($this->getLanguagesNumbers($languageList))
        );

        return $this->render('@ezdesign/admin/language/list.html.twig', [
            'pager' => $pagerfanta,
            'form_languages_delete' => $deleteLanguagesForm->createView(),
            /* @deprecated since version 2.2, to be removed in 3.0. Use 'can_administrate' instead. */
            'canEdit' => $this->isGranted(new Attribute('content', 'translations')),
            /* @deprecated since version 2.2, to be removed in 3.0. Use 'can_administrate' instead. */
            'canAssign' => $this->isGranted(new Attribute('content', 'translations')),
            'can_administrate' => $this->isGranted(new Attribute('content', 'translations')),
        ]);
    }
718241
public function index(Request $request)
    {
        // Set roles that have access
        $request->user()->authorizeRoles(['admin']);

        // Get all pagetypes
        $pagetypes = PageType::orderBy('updated_at', 'desc')
            ->orderBy('created_at', 'desc')
            ->paginate(self::PAGINATION_ITEMS);

        return view('page::pagetypes.index', ['pagetypes' => $pagetypes]);
    }
603310
public function inspectAction(Request $request, $_collector)
    {
        if (!$this->container->has('doctrine')) {
            throw new \LogicException('Cannot serve requests from database without doctrine enabled');
        }

        $page = $request->query->get('page', 1);
        /** @var RequestCollectorRepository */
        $requestCollectorRepository = $this->getDoctrine()->getRepository(RequestObject::class);
        $requestCollectorParams = $this->container->getParameter('deuzu_request_collector');

        if (!isset($requestCollectorParams['collectors'][$_collector])) {
            throw new \InvalidArgumentException(sprintf('The collector named %s cannot be found in configuration', $_collector));
        }

        $paginator = $requestCollectorRepository->findByCollector(
            $_collector,
            $page,
            $requestCollectorParams['collectors'][$_collector]['items_per_page']
        );

        return $this->render(
            'DeuzuRequestCollectorBundle:RequestCollector:index.html.twig',
            [
                'paginator' => $paginator,
                'assets' => $requestCollectorParams['assets'],
                'page' => $page,
                'itemsPerPage' => $requestCollectorParams['collectors'][$_collector]['items_per_page'],
            ]
        );
    }