Operation list All

List Variants

@param  PageRequest $page_request  (optional)

@throws \\ApiException on non-2xx response
@throws \InvalidArgumentException
@return \\Resources\page[Variant]
961219
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllVariants(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllVariants();
        }
    }
1104519
public function getPageBlocksByRequest(Request $request)
    {
        $routeName = $request->get('_route');
        $pageName = $this->routeConfig->getPageName($routeName);

        if (!isset($this->pageBlocks[$pageName])) {
            throw new \Exception(
                sprintf(
                    'Not found blocs for page with name \'%s\' and route name \'%s\'',
                    $pageName,
                    $routeName
                )
            );
        }
        $blocks = $this->pageBlocks[$pageName];

        // add route_params to blocks
        foreach ($blocks as $index => $block) {
            $blocks[$index]['settings']['route_params'] = $request->get('_route_params');
        }

        return $blocks;
    }
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();
        }
    }
155108
public function index(ListRequest $request)
    {
        return $this->paginate($this->service->index($request->all(), $request->getParams()['limit'],
            ['path' => 'asc']));
    }
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,
        );
    }
689490
public function listAction(Request $request)
    {
        $current_page = $request->get('page', 1);
        $current_page = $current_page > 1 ? $current_page : 1;
        $rep = $this->getRepository();

        // filter list notice
        $filter = $this->createForm('notices_filter')->handleRequest($request);
        if ($filter->isValid()) {
            $query = $rep->getFilteredQuery($filter->getData()['status'], $filter->getData()['type']);
        } else {
            $query = $rep->createQueryBuilder('n');
        }
        $query
            ->orderBy('n.date_created', 'DESC')
            ->setFirstResult(($current_page - 1) * self::NOTICE_PER_PAGE)
            ->setMaxResults(self::NOTICE_PER_PAGE);
        $list = $query->getQuery()->getResult();

        // get count all items
        $count = $query
            ->select('COUNT(n)')
            ->getQuery()
            ->getSingleScalarResult();

        // pagination
        $that = $this;
        $request_query = $request->query->all();
        unset($request_query['page']);
        $pagination = $this->get('anime_db.pagination')
            ->create(ceil($count / self::NOTICE_PER_PAGE), $current_page)
            ->setPageLink(function ($page) use ($that, $request_query) {
                return $that->generateUrl('notice_list', array_merge($request_query, ['page' => $page]));
            })
            ->setFirstPageLink($this->generateUrl('notice_list', $request_query))
            ->getView();

        return $this->render('AnimeDbCatalogBundle:Notice:list.html.twig', [
            'list' => $list,
            'pagination' => $pagination,
            'change_form' => $this->createForm(new ChangeNotice())->createView(),
            'filter' => $filter->createView(),
            'action_remove' => ChangeNotice::ACTION_REMOVE,
        ]);
    }
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,
        );
    }
1351094
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllFreeShippingPromotions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllFreeShippingPromotions();
        }
    }
1093855
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllReturnLineItems(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllReturnLineItems();
        }
    }
1043883
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllCustomers(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllCustomers();
        }
    }
407793
public function pagesListAction(Request $request)
    {
        $repository = $this->get('ekyna_cms.page.repository');

        $lastModifiedAt = $repository->getLastUpdatedAt();

        $response = new Response();
        $response->headers->set('Content-Type', 'application/json');
        $response->setLastModified($lastModifiedAt);

        if ($response->isNotModified($request)) {
            return $response;
        }

        $documentLocale = $request->query->get('document_locale', $request->getLocale());
        $list = [];

        /** @var \Ekyna\Bundle\CmsBundle\Model\PageInterface[] $pages */
        $pages = $this
            ->get('ekyna_cms.page.repository')
            ->findBy(['dynamicPath' => false], ['left' => 'ASC']);

        foreach ($pages as $page) {
            $list[] = $this->pageToArray($page, $documentLocale);
        }

        return $response->setContent(json_encode($list));
    }
1136992
private function getRequestedPage(Request $request)
    {
        $pageNumber = $request->query->getInt('page', 1);
        if (!$pageNumber || $pageNumber < 1) {
            $pageNumber = 1;
        }

        return $pageNumber;
    }
798844
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllOptions(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllOptions();
        }
    }
856662
public function create(PageRequest $request)
    {

        $page = $this->repository->newInstance([]);
        return $this->response->setMetaTitle(trans('app.new') . ' ' . trans('page::page.name')) 
            ->view('page::page.create', true) 
            ->data(compact('page'))
            ->output();
    }
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();
        }
    }
1243380
public static function findAll($page_request = null)
    {
        if($page_request != null){
            return self::listAllGeoZones(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);
        }else {
            return self::listAllGeoZones();
        }
    }
482733
function action_list()
    {
        $_model = $this->model;
        $gets = $this->gets;
        $gets['page'] = empty($_REQUEST[self::$page_key]) ? 1 : $_REQUEST[self::$page_key];
        $gets['pagesize'] = empty($_REQUEST[self::$pagesize_key]) ? self::$pagesize_default : $_REQUEST[self::$pagesize_key];

        /**
         * @var Pager
         */
        $pager = null;
        $this->vars['list'] = $this->model->gets($gets, $pager);
        $this->vars['pager'] = array(
            'total' => $pager->total,
            'render' => $pager->render(),
            'pagesize' => $pager->pagesize,
            'totalpage' => $pager->totalpage,
            'nowpage' => $pager->page
        );
        $this->swoole->tpl->ref('pager', $this->vars['pager']);
        $this->swoole->tpl->ref('list', $this->vars['list']);
    }