function SortPluginBase::query
Called to add the sort to a query.
Overrides HandlerBase::query
6 methods override SortPluginBase::query()
- Date::query in core/
modules/ views/ src/ Plugin/ views/ sort/ Date.php  - Called to add the sort to a query.
 - GroupByNumeric::query in core/
modules/ views/ src/ Plugin/ views/ sort/ GroupByNumeric.php  - Called to add the field to a query.
 - Random::query in core/
modules/ views/ src/ Plugin/ views/ sort/ Random.php  - Called to add the sort to a query.
 - Score::query in core/
modules/ search/ src/ Plugin/ views/ sort/ Score.php  - Called to add the sort to a query.
 - StatisticsLastCommentName::query in core/
modules/ comment/ src/ Plugin/ views/ sort/ StatisticsLastCommentName.php  - Called to add the sort to a query.
 
File
- 
              core/
modules/ views/ src/ Plugin/ views/ sort/ SortPluginBase.php, line 38  
Class
- SortPluginBase
 - Base sort handler that has no options and performs a simple sort.
 
Namespace
Drupal\views\Plugin\views\sortCode
public function query() {
  $this->ensureMyTable();
  // Add the field.
  $this->query
    ->addOrderBy($this->tableAlias, $this->realField, $this->options['order']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.