Get a paginated list of entities

@return \Slick\Orm\Entity\EntityCollection
178092
public function getList()
    {
        /** @var Select|QueryObjectInterface $query */
        $query = $this->getRepository()->find();
        $this->getFilters()->apply($query);
        $this->getPagination()->setTotal($query->count());
        $query->order($this->getOrder());
        $query->limit(
            $this->getPagination()->rowsPerPage,
            $this->getPagination()->offset
        );
        return $query->all();
    }
899771
protected function getListCollection()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->collection->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('type')) {
            return $this->collection->getList(array('type' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        if ($this->getParam('store')) {
            return $this->collection->getList(array('store_id' => $id, 'limit' => $this->getLimit()));
        }

        $result = $this->collection->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
970297
private function getCategoryCollection()
    {
        $categoryCollection = null;

        $suggestedTerms = $this->getSuggestedTerms();
        $terms          = [$this->queryFactory->get()->getQueryText()];

        if (!empty($suggestedTerms)) {
            $terms = array_merge($terms, $suggestedTerms);
        }

        $categoryCollection = $this->categoryCollectionFactory->create();
        $categoryCollection->addAttributeToSelect("is_active");
        $categoryCollection->setSearchQuery($terms);
        $categoryCollection->setPageSize($this->getResultsPageSize());

        return $categoryCollection;
    }
65725
public function getRepositories(array $entityNames)
    {
        $repositoryCollection = new EntityRepositoryCollection($this);
        foreach ($entityNames as $entityName) {
            $repositoryCollection->addRepository($this->getRepository($entityName));
        }
        return $repositoryCollection;
    }
1042277
protected function getListPage()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->page->getList($conditions);
        $this->prepareListPage($list);
        return $list;
    }
614510
public function findAll()
    {
        $keys = $this->getFileManager()->keys();
        $entities = array();
        if(is_array($keys)) {
            foreach($keys as $key) {
                if(preg_match('/^'.$this->getHash().'/', $key)) {
                    $entities[] = $this->loadEntity($key);
                }
            }
        }
        
        return $entities;
    }
317578
public function getAllRecords()
    {
        /* @var DataObject $recordType */
        $recordType = $this->getRecordType();
        $all = $recordType::get()->filterByCallBack(function (DataObject $obj) {
            return $obj->canView();
        });

        return new PaginatedList($all, $this->request);
    }
551177
public function findEntities(Request $request, $filters = array(), $addPagination = false)
    {
        $options = $this->getOptions($request, $filters, $addPagination);
        if (!$addPagination) {
            return array(
                'entities' => $this->getRepository()->getEntities($options),
                'options' => $options
            );
        }

        $entities = $this->getRepository()->getPaginatedEntities($options);
        $options['elements'] = $entities->count();
        $options['pages'] = (int)ceil($options['elements'] / $options['elementsPerPage']);

        return array(
            'entities' => $entities,
            'options' => $options
        );
    }
491661
public function getPagination(): array
    {
        if ($this->pagination === null) {
            $this->pagination = $this->setPagination();
        }

        return $this->pagination;
    }
146426
def get_entities_query(namespace, workspace, etype, page=1,
                       page_size=100, sort_direction="asc",
                       filter_terms=None):
    

    # Initial parameters for pagination
    params = {
        "page" : page,
        "pageSize" : page_size,
        "sortDirection" : sort_direction
    }
    if filter_terms:
        params['filterTerms'] = filter_terms

    uri = "workspaces/{0}/{1}/entityQuery/{2}".format(namespace,workspace,etype)
    return __get(uri, params=params)
484495
public function getPaginationList($params)
    {
        $qb = $this->getPaginationQueryBuilder($params);
        $cursor = $qb->hydrate(false)
                     ->select('_id')
                     ->getQuery()
                     ->execute();
        
        $list = new PaginationList(array_keys(ArrayUtils::iteratorToArray($cursor)));
        return $list;
    }
776344
protected function createPaginationObject()
    {
        $adapter = new DoctrineDbalAdapter(
            $this->deliverQueryObject(),
            function (\Doctrine\DBAL\Query\QueryBuilder $query) {
                $query
                    ->resetQueryParts(['groupBy', 'orderBy'])
                    ->select('count(distinct p.id)')
                    ->setMaxResults(1);
            }
        );
        $pagination = new Pagination($this, $adapter);

        return $pagination;
    }
101298
public function getList()
    {
        $objects = $this->manager->findAll();
        $this->addPaginationData($objects);
        $objects = $objects->getItems();
        if (empty($objects)) {
            $this->addInfoMessage(self::INFO_NO_ENTRIES_FOUND);
        }
        return $objects;
    }
1231626
public function getWebs()
    {
        if(!$this->isPropertyAvailable('Webs')){
            $this->setProperty("Webs", new WebCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(),"webs")));
        }
        return $this->getProperty("Webs");
    }
1273312
public function getPaginatedGalleryImages() {

        $getGalleryImages = $this->GalleryImages()->sort('SortOrder DESC');
        $getRequest = $this->getRequest();

        $paginatedGalleryImages = PaginatedList::create(
            $getGalleryImages,
            $getRequest
        )->setPageLength(12);

        return $paginatedGalleryImages;

    }
737759
public static function getList()
    {
        $db = Loader::db();
        $r = $db->query("select Pages.cID from Pages inner join Collections on Pages.cID = Collections.cID where cFilename is not null order by cDateModified desc");
        $pages = array();
        while ($row = $r->fetchRow()) {
            $c = Page::getByID($row['cID']);
            $pages[] = $c;
        }

        return $pages;
    }
324434
public function toDatamapperObject()
    {
        $entities = new DatamapperCollection;

        foreach ($this->items as $name => $item) {
            $entities->put($name, $item->toDatamapperObject());
        }

        return $entities;
    }