YearDate.php in Views XML Backend 8
File
src/Plugin/views/argument/YearDate.php
View source
<?php
namespace Drupal\views_xml_backend\Plugin\views\argument;
use Drupal\views_xml_backend\Xpath;
class YearDate extends Date {
protected $argFormat = 'Y';
public function __toString() {
$xpath = $this->options['xpath_selector'];
$value = (int) $this
->getValue();
$format = Xpath::escapeXpathString($this->argFormat);
return "php:functionString('views_xml_backend_format_value', {$xpath}, {$format}) = {$value}";
}
}
Classes
Name |
Description |
YearDate |
Argument handler for a year (CCYY). |