function None::init

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

Overrides PluginBase::init

File

core/modules/views/src/Plugin/views/pager/None.php, line 27

Class

None
Plugin for views without pagers.

Namespace

Drupal\views\Plugin\views\pager

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
    parent::init($view, $display, $options);
    // If the pager is set to none, then it should show all items.
    $this->setItemsPerPage(0);
}

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