Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. QueryInterface.php

function QueryInterface::pager

Enables a pager for the query.

Parameters

int $limit: (optional) An integer specifying the number of elements per page. If passed 0, the pager is disabled.

int|null $element: (optional) An integer to distinguish between multiple pagers on one page. If not provided, one is automatically calculated by incrementing the next pager element value.

Return value

$this

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 156

Class

QueryInterface
Interface for entity queries.

Namespace

Drupal\Core\Entity\Query

Code

public function pager($limit = 10, $element = NULL);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal