You are here

public function RestWSEntityResourceController::limit in RESTful Web Services 7.2

Implements RestWSQueryResourceControllerInterface::limit().

Overrides RestWSQueryResourceControllerInterface::limit

1 call to RestWSEntityResourceController::limit()
RestWSEntityResourceController::query in ./restws.entity.inc
Implements RestWSQueryResourceControllerInterface::query().

File

./restws.entity.inc, line 327
RESTful web services module integration for entities.

Class

RestWSEntityResourceController
Controller for entity-bases resources.

Code

public function limit($client_limit = NULL) {
  $limit = variable_get('restws_query_max_limit', 100);

  // Only allow user provided limits smaller than the system hard limit.
  if (!empty($client_limit) && $client_limit < $limit) {
    return $client_limit;
  }
  else {
    return $limit;
  }
}