You are here

public function Random::query in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/sort/Random.php \Drupal\views\Plugin\views\sort\Random::query()

Called to add the sort to a query.

Overrides SortPluginBase::query

File

core/modules/views/src/Plugin/views/sort/Random.php, line 27
Contains \Drupal\views\Plugin\views\sort\Random.

Class

Random
Handle a random sort.

Namespace

Drupal\views\Plugin\views\sort

Code

public function query() {
  $this->query
    ->addOrderBy('rand');
}