function QueryInterface::pager
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::pager()
- 10 core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::pager()
- 11.x core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::pager()
Enables a pager for the query.
Parameters
$limit: An integer specifying the number of elements per page. If passed a false value (FALSE, 0, NULL), the pager is disabled.
$element: An optional integer to distinguish between multiple pagers on one page. If not provided, one is automatically calculated.
Return value
$this The called object.
1 method overrides QueryInterface::pager()
- QueryBase::pager in core/
lib/ Drupal/ Core/ Entity/ Query/ QueryBase.php - Enables a pager for the query.
File
-
core/
lib/ Drupal/ Core/ Entity/ Query/ QueryInterface.php, line 140
Class
- QueryInterface
- Interface for entity queries.
Namespace
Drupal\Core\Entity\QueryCode
public function pager($limit = 10, $element = NULL);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.