public function Random::query in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/sort/Random.php \Drupal\views\Plugin\views\sort\Random::query()
- 9 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 25
Class
- Random
- Handle a random sort.
Namespace
Drupal\views\Plugin\views\sortCode
public function query() {
$this->query
->addOrderBy('rand');
}