Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / views / src / Plugin / views / argument / FullDate.php
1 <?php
2
3 namespace Drupal\views\Plugin\views\argument;
4
5 /**
6  * Argument handler for a full date (CCYYMMDD)
7  *
8  * @ViewsArgument("date_fulldate")
9  */
10 class FullDate extends Date {
11
12   /**
13    * {@inheritdoc}
14    */
15   protected $format = 'F j, Y';
16
17   /**
18    * {@inheritdoc}
19    */
20   protected $argFormat = 'Ymd';
21
22   /**
23    * Provide a link to the next level of the view
24    */
25   public function summaryName($data) {
26     $created = $data->{$this->name_alias};
27     return format_date(strtotime($created . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
28   }
29
30   /**
31    * Provide a link to the next level of the view
32    */
33   public function title() {
34     return format_date(strtotime($this->argument . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
35   }
36
37 }