You are here

public static function OffsetLimitPaginator::create in JSON:API Resources 8

Creates a new entity query modifier to handle offset pagination.

This method should never be called directly. Use \Drupal\jsonapi_resources\Resource\EntityQueryResourceBase::getPaginatorForRequest() instead.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request object which may have a `page` query parameter.

\Drupal\jsonapi_resources\Unstable\Entity\Query\CacheabilityCapturingExecutor $entity_query_executor: The cacheability capturing entity query executor.

Return value

static An offset paginator modifier derived from the request.

See also

\Drupal\jsonapi_resources\Resource\EntityQueryResourceBase::getPaginatorForRequest()

1 call to OffsetLimitPaginator::create()
EntityQueryResourceBase::getPaginatorForRequest in src/Resource/EntityQueryResourceBase.php
Gets an entity query paginator for the current request.

File

src/Unstable/Entity/Query/Pagination/OffsetLimitPaginator.php, line 72

Class

OffsetLimitPaginator
A paginator for handling offset-limit pagination in JSON:API request.

Namespace

Drupal\jsonapi_resources\Unstable\Entity\Query\Pagination

Code

public static function create(Request $request, CacheabilityCapturingExecutor $entity_query_executor) {
  return new static($request, $entity_query_executor);
}