You are here

public function CalendarPager::render in Calendar 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/pager/CalendarPager.php \Drupal\calendar\Plugin\views\pager\CalendarPager::render()

Return the renderable array of the pager.

Called during the view render process.

Parameters

$input: Any extra GET parameters that should be retained, such as exposed input.

Overrides PagerPluginBase::render

File

src/Plugin/views/pager/CalendarPager.php, line 49

Class

CalendarPager
The plugin to handle calendar pager.

Namespace

Drupal\calendar\Plugin\views\pager

Code

public function render($input) {

  // The $this->argument may be FALSE.
  if (!$this->argument || !$this->argument
    ->validateValue()) {
    return [];
  }
  $items['previous'] = [
    'url' => $this
      ->getPagerUrl(self::PREVIOUS, $input),
  ];
  $items['next'] = [
    'url' => $this
      ->getPagerUrl(self::NEXT, $input),
  ];
  return [
    '#theme' => $this
      ->themeFunctions(),
    '#items' => $items,
    '#exclude' => $this->options['exclude_display'],
  ];
}