You are here

public function ViewsJsonQuery::addOrderBy in Views Json Source 8

Same name and namespace in other branches
  1. 1.x src/Plugin/views/query/ViewsJsonQuery.php \Drupal\views_json_source\Plugin\views\query\ViewsJsonQuery::addOrderBy()

Add Order By.

File

src/Plugin/views/query/ViewsJsonQuery.php, line 536

Class

ViewsJsonQuery
Base query handler for views_json_source.

Namespace

Drupal\views_json_source\Plugin\views\query

Code

public function addOrderBy($table, $field = NULL, $orderby = 'ASC') {
  $this->orderby[] = [
    'field' => $field,
    'order' => $orderby,
  ];
}