You are here

public function DayDate::summaryName in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/argument/DayDate.php \Drupal\views\Plugin\views\argument\DayDate::summaryName()
  2. 10 core/modules/views/src/Plugin/views/argument/DayDate.php \Drupal\views\Plugin\views\argument\DayDate::summaryName()

Provides the name to use for the summary. By default this is just the name field.

Parameters

$data: The query results for the row.

Overrides ArgumentPluginBase::summaryName

File

core/modules/views/src/Plugin/views/argument/DayDate.php, line 25

Class

DayDate
Argument handler for a day (DD)

Namespace

Drupal\views\Plugin\views\argument

Code

public function summaryName($data) {
  $day = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT);

  // strtotime respects server timezone, so we need to set the time fixed as utc time
  return $this->dateFormatter
    ->format(strtotime("2005" . "05" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}