You are here

protected function CalendarPager::getPagerArgValue in Calendar 8

Get the date argument value for the pager link.

Parameters

string $mode: Either '-' or '+' to determine which direction.

Return value

string Formatted date time.

1 call to CalendarPager::getPagerArgValue()
CalendarPager::getPagerUrl in src/Plugin/views/pager/CalendarPager.php
Get the href value for the pager link.

File

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

Class

CalendarPager
The plugin to handle calendar pager.

Namespace

Drupal\calendar\Plugin\views\pager

Code

protected function getPagerArgValue($mode) {
  $datetime = $this->argument
    ->createDateTime();
  $datetime
    ->modify($mode . '1 ' . $this->argument
    ->getGranularity());
  return $datetime
    ->format($this->argument
    ->getArgFormat());
}