You are here

public function ViewExecutable::renderPager in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::renderPager()

Renders the pager, if necessary.

Parameters

string[] $exposed_input: The input values from the exposed forms and sorts of the view.

Return value

array|string The render array of the pager if it's set, blank string otherwise.

File

core/modules/views/src/ViewExecutable.php, line 953

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function renderPager($exposed_input) {
  if ($this
    ->usePager()) {
    return $this->pager
      ->render($exposed_input);
  }
  return '';
}