You are here

public function TableSort::__construct in Drupal 7

Overrides SelectQueryExtender::__construct

File

includes/tablesort.inc, line 24
Functions to aid in the creation of sortable tables.

Class

TableSort
Query extender class for tablesort queries.

Code

public function __construct(SelectQueryInterface $query, DatabaseConnection $connection) {
  parent::__construct($query, $connection);

  // Add convenience tag to mark that this is an extended query. We have to
  // do this in the constructor to ensure that it is set before preExecute()
  // gets called.
  $this
    ->addTag('tablesort');
}