public function Pager::getInfo

public Pager::getInfo()

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides ElementInterface::getInfo

File

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

Class

Pager
Provides a render element for a pager.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
  return [
    '#pre_render' => [
      get_class($this) . '::preRenderPager',
    ],
    '#theme' => 'pager',
    // The pager ID, to distinguish between multiple pagers on the same page.
    '#element' => 0,
    // 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>',
  ];
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Element!Pager.php/function/Pager::getInfo/8.1.x