function QueryInterface::tableSort

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::tableSort()
  2. 8.9.x core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::tableSort()
  3. 11.x core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::tableSort()

Enables sortable tables for this query.

Parameters

array $headers: An array of headers of the same structure as described in template_preprocess_table(). Use a 'specifier' in place of a 'field' to specify what to sort on. This can be an entity or a field as described in condition().

Return value

$this

1 method overrides QueryInterface::tableSort()
QueryBase::tableSort in core/lib/Drupal/Core/Entity/Query/QueryBase.php
Enables sortable tables for this query.

File

core/lib/Drupal/Core/Entity/Query/QueryInterface.php, line 213

Class

QueryInterface
Interface for entity queries.

Namespace

Drupal\Core\Entity\Query

Code

public function tableSort(&$headers);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.