You are here

public function DayDate::__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/DayDate.php, line 57
Contains \Drupal\views_xml_backend\Plugin\views\argument\DayDate.

Class

DayDate
Argument handler for a day (DD).

Namespace

Drupal\views_xml_backend\Plugin\views\argument

Code

public function __toString() {
  $xpath = $this->options['xpath_selector'];
  $value = Xpath::escapeXpathString(str_pad((int) $this
    ->getValue(), 2, '0', STR_PAD_LEFT));
  $format = Xpath::escapeXpathString($this->argFormat);
  return "php:functionString('views_xml_backend_format_value', {$xpath}, {$format}) = {$value}";
}