1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Definition of views_handler_sort_random.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Handle a random sort.
|
10 |
|
|
*
|
11 |
|
|
* @ingroup views_sort_handlers
|
12 |
|
|
*/
|
13 |
|
|
class views_handler_sort_random extends views_handler_sort {
|
14 |
5d12d676
|
Assos Assos
|
|
15 |
|
|
/**
|
16 |
|
|
* {@inheritdoc}
|
17 |
|
|
*/
|
18 |
|
|
public function query() {
|
19 |
85ad3d82
|
Assos Assos
|
$this->query->add_orderby('rand');
|
20 |
|
|
}
|
21 |
|
|
|
22 |
5d12d676
|
Assos Assos
|
/**
|
23 |
|
|
* {@inheritdoc}
|
24 |
|
|
*/
|
25 |
|
|
public function options_form(&$form, &$form_state) {
|
26 |
85ad3d82
|
Assos Assos
|
parent::options_form($form, $form_state);
|
27 |
|
|
$form['order']['#access'] = FALSE;
|
28 |
|
|
}
|
29 |
5d12d676
|
Assos Assos
|
|
30 |
85ad3d82
|
Assos Assos
|
} |