You are here

public function Standard::query in Views XML Backend 8

Same name in this branch
  1. 8 src/Plugin/views/filter/Standard.php \Drupal\views_xml_backend\Plugin\views\filter\Standard::query()
  2. 8 src/Plugin/views/sort/Standard.php \Drupal\views_xml_backend\Plugin\views\sort\Standard::query()
  3. 8 src/Plugin/views/argument/Standard.php \Drupal\views_xml_backend\Plugin\views\argument\Standard::query()

Called to add the sort to a query.

Overrides SortPluginBase::query

2 methods override Standard::query()
Date::query in src/Plugin/views/sort/Date.php
Called to add the sort to a query.
Numeric::query in src/Plugin/views/sort/Numeric.php
Called to add the sort to a query.

File

src/Plugin/views/sort/Standard.php, line 29
Contains \Drupal\views_xml_backend\Plugin\views\sort\Standard.

Class

Standard
Default implementation of the base sort plugin.

Namespace

Drupal\views_xml_backend\Plugin\views\sort

Code

public function query() {
  $alias = 'sort_string_' . $this->options['id'];
  $this->query
    ->addField($alias, $this->options['xpath_selector']);
  $this->query
    ->addSort(new StringSorter($alias, $this->options['order']));
}