Date.php in Zircon Profile 8
Same filename in this branch
- 8 vendor/symfony/validator/Constraints/Date.php
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/Date.php
- 8 core/lib/Drupal/Core/Render/Element/Date.php
- 8 core/modules/views/src/Plugin/views/filter/Date.php
- 8 core/modules/views/src/Plugin/views/sort/Date.php
- 8 core/modules/views/src/Plugin/views/argument/Date.php
- 8 core/modules/views/src/Plugin/views/field/Date.php
- 8 core/modules/datetime/src/Plugin/views/filter/Date.php
- 8 core/modules/datetime/src/Plugin/views/sort/Date.php
- 8 core/modules/datetime/src/Plugin/views/argument/Date.php
Same filename and directory in other branches
Namespace
Drupal\datetime\Plugin\views\ArgumentFile
core/modules/datetime/src/Plugin/views/argument/Date.phpView source
<?php
/**
 * @file
 * Contains \Drupal\datetime\Plugin\views\Argument\Date.
 */
namespace Drupal\datetime\Plugin\views\Argument;
use Drupal\views\Plugin\views\argument\Date as NumericDate;
/**
 * Abstract argument handler for dates.
 *
 * Adds an option to set a default argument based on the current date.
 *
 * Definitions terms:
 * - many to one: If true, the "many to one" helper will be used.
 * - invalid input: A string to give to the user for obviously invalid input.
 *                  This is deprecated in favor of argument validators.
 *
 * @see \Drupal\views\ManyTonOneHelper
 *
 * @ingroup views_argument_handlers
 *
 * @ViewsArgument("datetime")
 */
class Date extends NumericDate {
  /**
   * {@inheritdoc}
   */
  public function getDateField() {
    // Return the real field, since it is already in string format.
    return "{$this->tableAlias}.{$this->realField}";
  }
  /**
   * {@inheritdoc}
   */
  public function getDateFormat($format) {
    // Pass in the string-field option.
    return $this->query
      ->getDateFormat($this
      ->getDateField(), $format, TRUE);
  }
} 
      