You are here

FullDate.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/views/src/Plugin/views/argument/FullDate.php

File

core/modules/views/src/Plugin/views/argument/FullDate.php
View source
<?php

/**
 * @file
 * Contains \Drupal\views\Plugin\views\argument\FullDate.
 */
namespace Drupal\views\Plugin\views\argument;


/**
 * Argument handler for a full date (CCYYMMDD)
 *
 * @ViewsArgument("date_fulldate")
 */
class FullDate extends Date {

  /**
   * {@inheritdoc}
   */
  protected $format = 'F j, Y';

  /**
   * {@inheritdoc}
   */
  protected $argFormat = 'Ymd';

  /**
   * Provide a link to the next level of the view
   */
  public function summaryName($data) {
    $created = $data->{$this->name_alias};
    return format_date(strtotime($created . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
  }

  /**
   * Provide a link to the next level of the view
   */
  function title() {
    return format_date(strtotime($this->argument . " 00:00:00 UTC"), 'custom', $this->format, 'UTC');
  }

}

Classes

Namesort descending Description
FullDate Argument handler for a full date (CCYYMMDD)