You are here

protected function TableSortExtender::init in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Database/Query/TableSortExtender.php \Drupal\Core\Database\Query\TableSortExtender::init()

Initialize the table sort context.

1 call to TableSortExtender::init()
TableSortExtender::orderByHeader in core/lib/Drupal/Core/Database/Query/TableSortExtender.php
Order the query based on a header array.

File

core/lib/Drupal/Core/Database/Query/TableSortExtender.php, line 59
Contains \Drupal\Core\Database\Query\TableSortExtender.

Class

TableSortExtender
Query extender class for tablesort queries.

Namespace

Drupal\Core\Database\Query

Code

protected function init() {
  $ts = $this
    ->order();
  $ts['sort'] = $this
    ->getSort();
  $ts['query'] = $this
    ->getQueryParameters();
  return $ts;
}