Project

General

Profile

Paste
Download (480 Bytes) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / views / handlers / views_handler_sort_random.inc @ 4003efde

1
<?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

    
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function query() {
19
    $this->query->add_orderby('rand');
20
  }
21

    
22
  /**
23
   * {@inheritdoc}
24
   */
25
  public function options_form(&$form, &$form_state) {
26
    parent::options_form($form, $form_state);
27
    $form['order']['#access'] = FALSE;
28
  }
29

    
30
}