function PagerPluginBase::setItemsPerPage

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/pager/PagerPluginBase.php \Drupal\views\Plugin\views\pager\PagerPluginBase::setItemsPerPage()
  2. 10 core/modules/views/src/Plugin/views/pager/PagerPluginBase.php \Drupal\views\Plugin\views\pager\PagerPluginBase::setItemsPerPage()
  3. 11.x core/modules/views/src/Plugin/views/pager/PagerPluginBase.php \Drupal\views\Plugin\views\pager\PagerPluginBase::setItemsPerPage()

Set how many items per page this pager will display.

This is mostly used for things that will override the value.

1 call to PagerPluginBase::setItemsPerPage()
None::init in core/modules/views/src/Plugin/views/pager/None.php
Initialize the plugin.

File

core/modules/views/src/Plugin/views/pager/PagerPluginBase.php, line 54

Class

PagerPluginBase
Base class for views pager plugins.

Namespace

Drupal\views\Plugin\views\pager

Code

public function setItemsPerPage($items) {
    $this->options['items_per_page'] = $items;
}

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