Operation list All

List States

@param  PageRequest $page_request  (optional)

@throws \\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \\Resources\page[State]
764096
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllStates(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllStates();
        }
    }
1256517
public function listAction(Request $request): Response
    {
        $deletableContentTypeGroup = [];
        $count = [];

        $page = $request->query->get('page') ?? 1;

        $pagerfanta = new Pagerfanta(
            new ArrayAdapter($this->contentTypeService->loadContentTypeGroups())
        );

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

        /** @var \eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup[] $contentTypeGroupList */
        $contentTypeGroupList = $pagerfanta->getCurrentPageResults();

        $deleteContentTypeGroupsForm = $this->formFactory->deleteContentTypeGroups(
            new ContentTypeGroupsDeleteData($this->getContentTypeGroupsNumbers($contentTypeGroupList))
        );

        foreach ($contentTypeGroupList as $contentTypeGroup) {
            $contentTypesCount = count($this->contentTypeService->loadContentTypes($contentTypeGroup));
            $deletableContentTypeGroup[$contentTypeGroup->id] = !(bool)$contentTypesCount;
            $count[$contentTypeGroup->id] = $contentTypesCount;
        }

        return $this->render('@ezdesign/admin/content_type_group/list.html.twig', [
            'pager' => $pagerfanta,
            'form_content_type_groups_delete' => $deleteContentTypeGroupsForm->createView(),
            'deletable' => $deletableContentTypeGroup,
            'content_types_count' => $count,
            'can_create' => $this->isGranted(new Attribute('class', 'create')),
            'can_update' => $this->isGranted(new Attribute('class', 'update')),
            'can_delete' => $this->isGranted(new Attribute('class', 'delete')),
        ]);
    }
845511
public function index(PageRequest $request)
    {
        return $this->repository
            ->setPresenter(\Litecms\Page\Repositories\Presenter\PageListPresenter::class)
            ->paginate();
    }
68087
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllTableRateShippings(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllTableRateShippings();
        }
    }
806736
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCountries(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCountries();
        }
    }
505855
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllPaymentTokens(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllPaymentTokens();
        }
    }
518386
public function listByPageAction($page_id) {
        $em = $this->getDoctrine()->getManager();

        $entities = $em->getRepository('FlowcodePageBundle:Block')->findBy(array("page" => $page_id));
        $page = $em->getRepository('FlowcodePageBundle:Page')->find($page_id);

        return array(
            'page' => $page,
            'entities' => $entities,
        );
    }
794505
public function listAction($page = 1)
    {
        $paginator = $this->get("knp_paginator");

        if ($paginator instanceof \Knp\Component\Pager\Paginator) ;

        $query = $this->getPaginatorQuery();

        if ($this->getRequest()->get("sort")) {
            $query->orderBy($this->getRequest()->get("sort"), strtolower($this->getRequest()->get("direction")) == "asc" ? "asc" : "desc");
        }

        $pagination = $paginator->paginate(
            $query,
            $page
        );

        $pagination->setTemplate('KnpPaginatorBundle:Pagination:twitter_bootstrap_v3_pagination.html.twig');

        return array(
            'page' => $page,
            'pagination' => $pagination,
            'sort' => $this->getRequest()->get('sort'),
            'direction' => $this->getRequest()->get('direction'),
            'route' => $this->getRouteName(),
            'routeParams' => $this->getRouteParams(),
            'template' => $this->getListTemplate()
        );
    }
1357302
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllTableRateRules(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllTableRateRules();
        }
    }
1201340
public function update(PageRequest $request, Page $page)
    {
        $page->update($request->all());
        return new PageResource($page);
    }
56457
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllZipCodesGeoZones(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllZipCodesGeoZones();
        }
    }
343867
public function lists($page = 1, $query = null, array $params = [])
    {
        $this->listPage = $page;
        $this->listQuery = $query;
        $this->listParams = $params;

        return $this->getList();
    }
895148
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCancelOperations(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCancelOperations();
        }
    }
432674
public function listAction(Request $request)
    {
        $this->buildBreadcrumbs($this->getType());

        $queryBuilder = $this->getDoctrine()
            ->getManager()
            ->createQueryBuilder()
            ->select('e')
            ->from($this->getEntityName($this->getType()), 'e')
            ->orderBy('e.id', 'DESC');

        $adapter = new DoctrineORMAdapter($this->alterListQuery($queryBuilder));
        $data = new Pagerfanta($adapter);
        $data->setCurrentPage($request->query->get('page', 1));

        $module = $this->getModule($this->getType());

        return $this->render($this->getListTemplate(), array_merge(array(
            'data' => $data,
            'type' => $this->getType(),
            'module' => $module,
            'submodules' => $this->getSubmodules($module),
        ), $this->getExtraListVariables()));
    }
260185
public function indexAction(Request $request)
    {

        $page = $request->get("page", 1);
        $em = $this->getDoctrine()->getManager();
        $dql = "SELECT p FROM AmulenPageBundle:Page p";
        $query = $em->createQuery($dql);
        $paginator = $this->get('knp_paginator');
        $pagination = $paginator->paginate($query, $this->get('request')->query->get('page', $page));

        return array(
            'pagination' => $pagination,
        );
    }
186320
public function listPages($location_id)
    {
        list($response, $statusCode, $httpHeader) = $this->listPagesWithHttpInfo ($location_id);
        return $response; 
    }
249586
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllProducts(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllProducts();
        }
    }