You are here

public function PagerPluginBase::setItemsPerPage in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/pager/PagerPluginBase.php \Drupal\views\Plugin\views\pager\PagerPluginBase::setItemsPerPage()
  2. 9 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;
}