You are here

public function None::init in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/pager/None.php \Drupal\views\Plugin\views\pager\None::init()

Initialize the plugin.

Parameters

\Drupal\views\ViewExecutable $view: The view object.

\Drupal\views\Plugin\views\display\DisplayPluginBase $display: The display handler.

array $options: The options configured for this plugin.

Overrides PluginBase::init

File

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

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);
}