public function YearMonthDate::summaryName in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/argument/YearMonthDate.php \Drupal\views\Plugin\views\argument\YearMonthDate::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/ YearMonthDate.php, line 25
Class
- YearMonthDate
- Argument handler for a year plus month (CCYYMM)
Namespace
Drupal\views\Plugin\views\argumentCode
public function summaryName($data) {
$created = $data->{$this->name_alias};
return $this->dateFormatter
->format(strtotime($created . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}