You are here

views_handler_filter_node_type.inc in Views (for Drupal 7) 6.3

File

modules/node/views_handler_filter_node_type.inc
View source
<?php

/**
 * Filter by node type
 *
 * @ingroup views_filter_handlers
 */
class views_handler_filter_node_type extends views_handler_filter_in_operator {
  function get_value_options() {
    if (!isset($this->value_options)) {
      $this->value_title = t('Node type');
      $types = node_get_types();
      foreach ($types as $type => $info) {
        $options[$type] = t($info->name);
      }
      asort($options);
      $this->value_options = $options;
    }
  }

}

Classes

Namesort descending Description
views_handler_filter_node_type Filter by node type