function Pager::getInfo

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/Element/Pager.php \Drupal\Core\Render\Element\Pager::getInfo()
  2. 8.9.x core/lib/Drupal/Core/Render/Element/Pager.php \Drupal\Core\Render\Element\Pager::getInfo()
  3. 11.x core/lib/Drupal/Core/Render/Element/Pager.php \Drupal\Core\Render\Element\Pager::getInfo()

Overrides ElementInterface::getInfo

File

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

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>',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.