public function YearDate::__toString in Views XML Backend 8
Generates an XPath argument string.
Return value
string The XPath argument string.
Overrides Date::__toString
File
- src/
Plugin/ views/ argument/ YearDate.php, line 29 - Contains \Drupal\views_xml_backend\Plugin\views\argument\YearDate.
Class
- YearDate
- Argument handler for a year (CCYY).
Namespace
Drupal\views_xml_backend\Plugin\views\argumentCode
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}";
}