You are here

public function StringSorter::__construct in Views XML Backend 8

Constructs a StringSorter object.

Parameters

string $field: The field to sort.

string $direction: The direction to sort.

File

src/Sorter/StringSorter.php, line 39
Contains \Drupal\views_xml_backend\Sorter\StringSorter.

Class

StringSorter
Provides sorting for strings.

Namespace

Drupal\views_xml_backend\Sorter

Code

public function __construct($field, $direction) {
  $this->field = $field;
  $this->direction = strtoupper($direction);
}