redirect_handler_filter_redirect_type.inc 508 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * @file
  4. * Filter by redirect type.
  5. */
  6. class redirect_handler_filter_redirect_type extends views_handler_filter_in_operator {
  7. function get_value_options() {
  8. if (!isset($this->value_options)) {
  9. $this->value_title = t('Redirect type');
  10. $options = array();
  11. $types = db_query("SELECT DISTINCT type FROM {redirect}")->fetchCol();
  12. foreach ($types as $type) {
  13. $options[$type] = t(drupal_ucfirst($type));
  14. }
  15. $this->value_options = $options;
  16. }
  17. }
  18. }