3 namespace Drupal\views\Plugin\views\argument;
6 * Argument handler for a month (MM)
8 * @ViewsArgument("date_month")
10 class MonthDate extends Date {
15 protected $format = 'F';
20 protected $argFormat = 'm';
23 * Provide a link to the next level of the view
25 public function summaryName($data) {
26 $month = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT);
27 return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
31 * Provide a link to the next level of the view
33 public function title() {
34 $month = str_pad($this->argument, 2, '0', STR_PAD_LEFT);
35 return format_date(strtotime("2005" . $month . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
38 public function summaryArgument($data) {
39 // Make sure the argument contains leading zeroes.
40 return str_pad($data->{$this->base_alias}, 2, '0', STR_PAD_LEFT);