You are here

public function MonthDate::summaryName in Views XML Backend 8

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

src/Plugin/views/argument/MonthDate.php, line 32
Contains \Drupal\views_xml_backend\Plugin\views\argument\MonthDate.

Class

MonthDate
Argument handler for a month (MM).

Namespace

Drupal\views_xml_backend\Plugin\views\argument

Code

public function summaryName($data) {
  $month = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT);
  return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
}