You are here

protected function RestfulDataProviderEFQ::queryForListPagination in RESTful 7

Set correct page (i.e. range) for the query for list.

Determine the page that should be seen. Page 1, is actually offset 0 in the query range.

Parameters

\EntityFieldQuery $query: The query object.

Throws

\RestfulBadRequestException

See also

\RestfulEntityBase::getQueryForList

1 call to RestfulDataProviderEFQ::queryForListPagination()
RestfulDataProviderEFQ::getQueryForList in plugins/restful/RestfulDataProviderEFQ.php
Prepare a query for RestfulEntityBase::getList().

File

plugins/restful/RestfulDataProviderEFQ.php, line 294
Contains \RestfulDataProviderEFQ

Class

RestfulDataProviderEFQ
@file Contains \RestfulDataProviderEFQ

Code

protected function queryForListPagination(\EntityFieldQuery $query) {
  list($offset, $range) = $this
    ->parseRequestForListPagination();
  $query
    ->range($offset, $range);
}