You are here

public function Random::query in Views (for Drupal 7) 8.3

Called to add the sort to a query.

Overrides SortPluginBase::query

File

lib/Drupal/views/Plugin/views/sort/Random.php, line 21
Definition of Drupal\views\Plugin\views\sort\Random.

Class

Random
Handle a random sort.

Namespace

Drupal\views\Plugin\views\sort

Code

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