Projet

Général

Profil

Paste
Télécharger (550 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / modules / system / views_handler_filter_system_type.inc @ 5d12d676

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of views_handler_filter_system_type.
6
 */
7

    
8
/**
9
 * Filter by system type.
10
 */
11
class views_handler_filter_system_type extends views_handler_filter_in_operator {
12

    
13
  /**
14
   * {@inheritdoc}
15
   */
16
  public function get_value_options() {
17
    if (!isset($this->value_options)) {
18
      $this->value_title = t('Type');
19
      // Enable filtering by type.
20
      $types = array();
21
      $types = db_query('SELECT DISTINCT(type) FROM {system} ORDER BY type')->fetchAllKeyed(0, 0);
22
      $this->value_options = $types;
23
    }
24
  }
25

    
26
}