Loads entity IDs using a pager sorted by the entity id.

@return array
An array of entity IDs.
5206
protected function getEntityIds() {
    $query = $this->getStorage()->getQuery()
      ->sort($this->entityType->getKey('id'), 'DESC');

    $this->limit = 1000;
    if ($this->limit) {
      $query->pager($this->limit);
    }

    return $query->execute();
  }
904764
public function getUserTypeEntities($entityId = false) {
        if (!empty($entityId)) {
            $filter = is_array($entityId) ? $entityId : array(
                'ENTITY_ID' => $entityId
            );
        } else {
            $filter = array();
        }


        /** @noinspection PhpDynamicAsStaticMethodCallInspection */
        $dbres = \CUserTypeEntity::GetList(array(), $filter);
        $result = array();
        while ($item = $dbres->Fetch()) {
            $result[] = $this->getUserTypeEntityById($item['ID']);

        }
        return $result;
    }
1021542
public function getList()
    {
        //ACCESS CHECK
        if (!$this->isAllowed(
            ResourceName::RESOURCE_SITES,
            'admin'
        )
        ) {
            $this->getResponse()->setStatusCode(Response::STATUS_CODE_401);

            return $this->getResponse();
        }

        /** @var \Doctrine\ORM\EntityManagerInterface $entityManager */
        $entityManager = $this->getEntityManager();

        /** @var \Rcm\Repository\Site $siteRepo */
        $siteRepo = $entityManager->getRepository(\Rcm\Entity\Site::class);
        $createQueryBuilder = $siteRepo->createQueryBuilder('site')
            ->select('site')
            ->leftJoin('site.domain', 'domain')
            ->leftJoin('site.country', 'country')
            ->leftJoin('site.language', 'language');
        // @todo This is broken in doctrine 1.* with MySQL 5.7
        //->orderBy('domain.domain', 'ASC');

        $query = $createQueryBuilder->getQuery();

        $searchQuery = $this->params()->fromQuery('q');

        if ($searchQuery) {
            $createQueryBuilder->where(
                $createQueryBuilder->expr()->like(
                    'domain.domain',
                    ':searchQuery'
                )
            );
            $query = $createQueryBuilder->getQuery();
            $query->setParameter('searchQuery', $searchQuery . '%');
        }

        $adaptor = new DoctrinePaginator(
            new ORMPaginator($query)
        );
        $paginator = new Paginator($adaptor);
        $paginator->setDefaultItemCountPerPage(10);

        $page = (int)$this->params()->fromQuery('page');

        if ($page) {
            $paginator->setCurrentPageNumber($page);
        }

        $pageSize = (int)$this->params()->fromQuery('page_size');
        if ($pageSize) {
            $paginator->setItemCountPerPage($pageSize);
        }

        $sitesObjects = $paginator->getCurrentItems();

        $sites = [];

        /** @var \Rcm\Entity\Site $site */
        foreach ($sitesObjects as $site) {
            $sites[] = $site->toArray();
        }

        $list['items'] = $sites;
        $list['itemCount'] = $paginator->getTotalItemCount();
        $list['pageCount'] = $paginator->count();
        $list['currentPage'] = $paginator->getCurrentPageNumber();

        return new ApiJsonModel($list, 0, 'Success');
    }
601937
public function getRootPageLanguageIds() : array
    {
        $rootPageLanguageIds = [];
        $rootPageId = $this->getRootPageId();
        $rootPageOverlays = $this->pagesRepository->findTranslationOverlaysByPageId($rootPageId);
        if (count($rootPageOverlays)) {
            foreach ($rootPageOverlays as $rootPageOverlay) {
                $rootPageLanguageIds[] = $rootPageOverlay['sys_language_uid'];
            }
        }
        return $rootPageLanguageIds;
    }
37425
protected function load($entityId)
    {
        $table = $this->getEntityDescriptor()->getTableName();
        $primaryKey = $this->getEntityDescriptor()
            ->getPrimaryKey()
            ->getField();

        return $this->find()
            ->where([
                "{$table}.{$primaryKey} = :id" => [':id' => $entityId]
            ])
            ->first();
    }
1178905
public function getCandidateIds(): array
    {
        $candidateIds = [];

        foreach ($this->candidates as $candidate) {
            $candidateIds[] = $candidate->getId();
        }

        return $candidateIds;
    }
1134124
public function getSellerIds()
    {
        $sellerIds = array();

        foreach ($this->getOrders() as $order)
        {
            $sellerIds[] = $order->getSeller()->getId();
        }

        return $sellerIds;
    }
922320
public function findAllDistinctPageClasses()
    {
        $qb = $this->createQueryBuilder('n')
            ->select('n.refEntityName')
            ->where('n.deleted = 0')
            ->distinct(true);

        return $qb->getQuery()->getArrayResult();
    }
71211
public static function getList()
    {
        $app = Application::getFacadeApplication();
        $em = $app->make(EntityManagerInterface::class);

        return $em->getRepository(ThumbnailTypeEntity::class)->findBy([], ['ftTypeWidth' => 'asc']);
    }
142092
protected function getPages(): array
    {
        $pages = [];

        $pages['previous_page'] = $this->pagerfanta->hasPreviousPage() ?
            $this->generateUrl($this->pagerfanta->getPreviousPage()) :
            false;

        $pages['first_page'] = $this->startPage > 1 ? $this->generateUrl(1) : false;
        $pages['mobile_first_page'] = $this->pagerfanta->getCurrentPage() > 2 ? $this->generateUrl(1) : false;

        $pages['second_page'] = $this->startPage === 3 ? $this->generateUrl(2) : false;

        $pages['separator_before'] = $this->startPage > 3;

        $middlePages = [];
        for ($i = $this->startPage, $end = $this->endPage; $i <= $end; ++$i) {
            $middlePages[$i] = $this->generateUrl($i);
        }

        $pages['middle_pages'] = $middlePages;

        $pages['separator_after'] = $this->endPage < $this->pagerfanta->getNbPages() - 2;

        $pages['second_to_last_page'] = $this->endPage === $this->pagerfanta->getNbPages() - 2 ?
            $this->generateUrl($this->pagerfanta->getNbPages() - 1) :
            false;

        $pages['last_page'] = $this->pagerfanta->getNbPages() > $this->endPage ?
            $this->generateUrl($this->pagerfanta->getNbPages()) :
            false;

        $pages['mobile_last_page'] = $this->pagerfanta->getCurrentPage() < $this->pagerfanta->getNbPages() - 1 ?
            $this->generateUrl($this->pagerfanta->getNbPages()) :
            false;

        $pages['next_page'] = $this->pagerfanta->hasNextPage() ?
            $this->generateUrl($this->pagerfanta->getNextPage()) :
            false;

        return $pages;
    }
316542
public function fetchAll() {
		if ($this->selection) {
			/** @var ActiveRow $entity */
			foreach ($this->selection as $entity) {
				$this->createEntity($entity);
			}
		}

		return $this->rows;
	}
532625
protected function getIDListFromCache() : array
    {
        $arElementIDList = parent::getIDListFromCache();

        //Get active product list
        $arActiveProductIDList = ProductListStore::instance()->active->get();
        if (empty($arActiveProductIDList) || empty($arElementIDList)) {
            return [];
        }

        $arResult = [];
        foreach ($arElementIDList as $iProductID => $iBrandID) {
            if (!in_array($iProductID, $arActiveProductIDList)) {
                continue;
            }

            $arResult[] = $iBrandID;
        }

        $arResult = array_unique($arResult);

        return $arResult;
    }
777285
public function getIds(): array {
        $ids  = array($this->id);
        $meta = $this->getMetadata();
        foreach ($meta->allResources(RC::idProp()) as $id) {
            $ids[] = $id->getUri();
        }
        $ids = array_unique($ids);
        return $ids;
    }
792617
public function getUrls()
    {
        $entities = [];
        if ($this->entity->getUrls()) {
            foreach ($this->entity->getUrls() as $entity) {
                $entities[] = $entity;
            }
        }

        return $entities;
    }
713729
public function getIds()
    {
        $res = array();
        $array = wincache_ucache_info();
        $records = $array['ucache_entries'];
        foreach ($records as $record) {
            $res[] = $record['key_name'];
        }
        return $res;
    }
242953
public static function getChildPageIds($pageId)
    {
        if (empty(self::$preloaded_page_children)) {
            foreach (static::preloadArray() as $key => $page) {
                if (!isset(self::$preloaded_page_children[$page->parent])) {
                    self::$preloaded_page_children[$page->parent] = [];
                }
                self::$preloaded_page_children[$page->parent][] = $page->id;
            }
        }
        return !empty(self::$preloaded_page_children[$pageId]) ? self::$preloaded_page_children[$pageId] : [];
    }
652
protected function findIdsByGivenCriteria()
    {
        $select = $this->getSelectAs($this->idField);

        $subQueryBuilder = $this->createSubQueryBuilder($select);
        if (null != $this->limit) {
            $subQueryBuilder->setMaxResults($this->limit)->setFirstResult($this->limit * ($this->page - 1));
        }

        foreach ($this->sortFields as $index => $sortField) {
            if ($sortField->getName() !== $this->idField->getName()) {
                $subQueryBuilder->addSelect($this->getSelectAs($sortField));
            }
        }

        $this->assignSortFields($subQueryBuilder);
        $this->assignParameters($this->queryBuilder);
        $ids = $subQueryBuilder->getQuery()->getArrayResult();

        // if no results are found - return
        if (count($ids) < 1) {
            return [];
        }

        $ids = array_map(
            function($array) {
                return $array[$this->idField->getName()];
            },
            $ids
        );

        return $ids;
    }