You are here

public function Xml::addSort in Views XML Backend 8

Adds a sorter callable.

Parameters

callable $callback: A callable that can sort a views result.

See also

\Drupal\views_xml_backend\Sorter\SorterInterface

File

src/Plugin/views/query/Xml.php, line 298
Contains \Drupal\views_xml_backend\Plugin\views\query\Xml.

Class

Xml
Views query plugin for an XML query.

Namespace

Drupal\views_xml_backend\Plugin\views\query

Code

public function addSort(callable $callback) {
  $this->orderby[] = $callback;
}