You are here

biblio_handler_filter_biblio_contributor_auth_type.inc in Bibliography Module 7

File

views/biblio_handler_filter_biblio_contributor_auth_type.inc
View source
<?php

/**
 *
 */
class biblio_handler_filter_biblio_contributor_auth_type extends views_handler_filter_in_operator {

  /**
   *
   */
  public function construct() {
    parent::construct();
    $this->definition['numeric'] = TRUE;
  }

  /**
   *
   */
  public function get_value_options() {
    if (!isset($this->value_options)) {
      $result = db_query("SELECT title, auth_type\n              FROM {biblio_contributor_type_data}\n              ORDER by auth_type");
      $this->value_title = t('Author type');
      $options = array();
      foreach ($result as $row) {
        $options[$row->auth_type] = $row->title;
      }
      $this->value_options = $options;
    }
  }

}