public function SortsField::__construct in Search API sorts 8
Constructs an instance of the value object.
Parameters
string $field: The field to sort on.
string $order: The direction to sort on.
File
- src/
SortsField.php, line 32
Class
- SortsField
- A value object for a sorts field.
Namespace
Drupal\search_api_sortsCode
public function __construct($field, $order = NULL) {
$this
->setFieldName($field);
$this
->setOrder($order);
}