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

Breadcrumb

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

function Pager::getInfo

Overrides ElementInterface::getInfo

File

core/lib/Drupal/Core/Render/Element/Pager.php, line 40

Class

Pager
Provides a render element for a pager.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
    return [
        '#pre_render' => [
            static::class . '::preRenderPager',
        ],
        '#theme' => 'pager',
        // The pager ID, to distinguish between multiple pagers on the same page.
'#element' => 0,
        // The heading level to use for the pager.
'#pagination_heading_level' => 'h4',
        // An associative array of query string parameters to append to the pager
        // links.
'#parameters' => [],
        // The number of pages in the list.
'#quantity' => 9,
        // An array of labels for the controls in the pager.
'#tags' => [],
        // The name of the route to be used to build pager links. By default no
        // path is provided, which will make links relative to the current URL.
        // This makes the page more effectively cacheable.
'#route_name' => '<none>',
    ];
}

API Navigation

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