eZ\Publish\Core\Repository\LocationService::searchChildrenLocations PHP Method

searchChildrenLocations() protected method

Searches children locations of the provided parent location id.
protected searchChildrenLocations ( eZ\Publish\API\Repository\Values\Content\Location $location, integer $offset, integer $limit ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$location eZ\Publish\API\Repository\Values\Content\Location
$offset integer
$limit integer
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult
    protected function searchChildrenLocations(APILocation $location, $offset = 0, $limit = -1)
    {
        $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);
    }