You are here

redirect_handler_filter_redirect_type.inc in Redirect 7.2

Same filename and directory in other branches
  1. 7 views/redirect_handler_filter_redirect_type.inc

Filter by redirect type.

File

views/redirect_handler_filter_redirect_type.inc
View source
<?php

/**
 * @file
 * Filter by redirect type.
 */
class redirect_handler_filter_redirect_type extends views_handler_filter_in_operator {
  function get_value_options() {
    if (!isset($this->value_options)) {
      $this->value_title = t('Redirect type');
      $options = array();
      $types = db_query("SELECT DISTINCT type FROM {redirect}")
        ->fetchCol();
      foreach ($types as $type) {
        $options[$type] = t(drupal_ucfirst($type));
      }
      $this->value_options = $options;
    }
  }

}

Classes

Namesort descending Description
redirect_handler_filter_redirect_type @file Filter by redirect type.