Searches children locations of the provided parent location id.

@param \eZ\Publish\API\Repository\Values\Content\Location $location
@param int $offset
@param int $limit

@return \eZ\Publish\API\Repository\Values\Content\Search\SearchResult
185758
protected function searchChildrenLocations(APILocation $location, $offset = 0, $limit = -1, array $prioritizedLanguages = null)
    {
        $query = new LocationQuery([
            'filter' => new Criterion\ParentLocationId($location->id),
            'offset' => $offset >= 0 ? (int)$offset : 0,
            'limit' => $limit >= 0 ? (int)$limit : null,
            'sortClauses' => $location->getSortClauses(),
        ]);

        return $this->repository->getSearchService()->findLocations($query, ['languages' => $prioritizedLanguages]);
    }
1032397
public function limit($offset, $limit)
	{
		$this->criteria->setFirstResult($offset)->setMaxResults($limit);

		return $this;
	}
634867
public function getItems($offset, $limit)
    {
        $query = $this->search->getQuery();
        $query->setFrom($offset);
        $query->setSize($limit);

        return $this->search->search()->getResults();
    }
1344181
public function loadAllLocationsData($offset, $limit)
    {
        $query = $this
            ->getAllLocationsQueryBuilder(
                [
                    'node_id',
                    'priority',
                    'is_hidden',
                    'is_invisible',
                    'remote_id',
                    'contentobject_id',
                    'parent_node_id',
                    'path_identification_string',
                    'path_string',
                    'depth',
                    'sort_field',
                    'sort_order',
                ]
            )
            ->setFirstResult($offset)
            ->setMaxResults($limit)
            ->orderBy('depth', 'ASC')
            ->addOrderBy('node_id', 'ASC')
        ;

        $statement = $query->execute();

        return $statement->fetchAll(PDO::FETCH_ASSOC);
    }
1075189
public function fetchAll($limit = null, $offset = null){
		$limit = $limit === null ? -1 : (int) $limit;
		if($offset !== null)
			$this->seek((int) $offset);

		$row = $this->fetch();
		if(!$row)
			return array();

		$rows = array();
		do{
			if($limit === 0)
				break;
			$rows[] = $row;
			$limit--;
		} while($row = $this->fetch());

		return $rows;
	}
1239051
public function getResult($limit = 0, $offset = 0)
    {
        $this->count();
        $this->queryBuilder->setFirstResult($offset)->setMaxResults($limit);

        if ($limit > 0) {
            $pathOrderBy = $this->getSqlPart($this->queryBuilder, 'orderBy');
            $this->resetSqlParts($this->queryBuilder, ['orderBy']);
            $qb = $this->cloneQb($this->queryBuilder);
            $qb->select(sprintf('%s', $this->aliasDotPrimary()))
                ->setFirstResult(null)
                ->setMaxResults(null);

            /** @var OrderBy $part */
            foreach ($pathOrderBy as $part) {
                foreach ($part->getParts() as $order) {
                    $out = [];
                    preg_match('/(.*[^\s])?\s+(asc|desc)/i', $order, $out);
                    $property = $out[1];
                    $direction = $out[2];
                    $alias = ($key = array_search($property, $this->aliasMapping)) ?: $property;
                    if ($this->isAggFunc($property)) {
                        $qb->addSelect($property.' AS '.$alias);
                        $qb->addOrderBy($alias, $direction);
                        $this->queryBuilder->addOrderBy($alias, $direction);
                    } else {
                        $qb->addOrderBy($property, $direction);
                        $this->queryBuilder->addOrderBy($property, $direction);
                    }
                }
            }

            $query = $qb->getQuery();

            foreach ($this->hints as $name => $hint) {
                $query->setHint($name, $hint);
            }

            $params = $types = [];
            /** @var Parameter $parameter */
            foreach ($query->getParameters() as $key => $parameter) {
                $params[$key] = $parameter->getValue();
                $types[$key] = $parameter->getType();
            }

            /** @var \PDOStatement $stmt */
            $stmt = $this->queryBuilder->getEntityManager()->getConnection()->executeQuery(
                $query->getSQL(),
                $params,
                $types
            );

            $ids = $stmt->fetchAll(\PDO::FETCH_COLUMN, 0);
            $ids = array_values(array_unique($ids));

            if (!$ids) {
                return [];
            }
            $ids = array_slice($ids, $offset, $limit);
            $this->queryBuilder
                ->setFirstResult(null)
                ->setMaxResults(null)
                ->where(sprintf("%s IN (:_sps_ids_)", $this->aliasDotPrimary()))
                ->setParameters(['_sps_ids_' => $ids]);
        }
        $query = $this->queryBuilder->getQuery();
        foreach ($this->hints as $name => $hint) {
            $query->setHint($name, $hint);
        }
        $this->result = $query->getResult();
        if (!$this->totalResultCount) {
            $this->totalResultCount = count($this->result);
        }

        return $this->result;
    }
267158
public function limit($offset = null, $limit = null)
    {
    	$args = func_get_args();
    	if (count($args) === 0) {
    		throw new Exception('At least 1 argument');
    	}
    	if (count($args) == 1) {
    		$this->limit =  $args[0];
    	} else {
    		list($this->offset, $this->limit) = $args;
    	}
        return $this;
    }
434439
public function limit($start, $offset = null) {
        $this->_limit = ' LIMIT ' . $start;
        
        if (!is_null($offset)) {
            $this->_limit .= ', ' . $offset;    
        }
        
        return $this;
    }
301480
public function listCampaigns($limit = null, $offset = null)
    {
        $data = array();
        if (!empty($limit)) {
            $data['limit'] = $limit;
        }
        if (!empty($offset)) {
            $data['offset'] = $offset;
        }
        $requestResult = $this->sendRequest('campaigns', 'GET', $data);

        return $this->handleResult($requestResult);
    }
594637
public function list(int $offset = 0, int $limit = 10)
    {
        $params = [
            'offset' => $offset,
            'limit' => $limit,
        ];

        return $this->httpPostJson('wxa/get_store_list', $params);
    }
401917
public function limit($limit, $offset = null)
    {
        $self              = self::getInstance();
        $offset            = (!empty($offset)) ? 'OFFSET '.$offset : null;
        $self->optionLimit = " LIMIT {$limit} ".$offset;

        return $self;
    }
409304
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
    {
        $criteria = array_merge($criteria, array("deleted" => false));

        return parent::findBy($criteria, $orderBy, $limit, $offset);
    }
144466
public function limit($limit, $offset = NULL)
	{
		$this->emptyResult();

		$this->queryBuilder->limit($limit, $offset);
		return $this;
	}
1008153
public function search(
        Search $data,
        $limit = 0,
        $offset = 0,
        $sort_column = self::DEFAULT_SORT_COLUMN,
        $sort_direction = self::DEFAULT_SORT_DIRECTION
    ) {
        return $this->driver->search(
            $data,
            ($limit > 0 ? (int) $limit : 0),
            ($offset > 0 ? (int) $offset : 0),
            $this->getValidSortColumn($sort_column),
            $this->getValidSortDirection($sort_direction)
        );
    }
721174
public function limit($limit, $offset = null){
		if($this->validateConditions())
			return $this;

		$this->resetState();
		$this->limit = array($limit,
			($offset !== null && $this->type === Manager::STMT_SELECT) ? $offset : null);
		return $this;
	}
774904
protected function switchPersisterContext($offset, $limit)
    {
        if (null === $offset && null === $limit) {
            $this->currentPersisterContext = $this->noLimitsContext;

            return;
        }

        $this->currentPersisterContext = $this->limitsHandlingContext;
    }
876080
private function findChild(int $locationId, LoadSubtreeRequestNode $loadSubtreeRequestNode): ?LoadSubtreeRequestNode
    {
        foreach ($loadSubtreeRequestNode->children as $child) {
            if ($child->locationId === $locationId) {
                return $child;
            }
        }

        return null;
    }