You are here

public function SortPluginBase::query in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\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.

... See full list

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\sort

Code

public function query() {
  $this
    ->ensureMyTable();

  // Add the field.
  $this->query
    ->addOrderBy($this->tableAlias, $this->realField, $this->options['order']);
}