views_handler_filter_node_type.inc
Same filename in other branches
Definition of views_handler_filter_node_type.
File
-
modules/
node/ views_handler_filter_node_type.inc
View source
<?php
/**
* @file
* Definition of views_handler_filter_node_type.
*/
/**
* Filter by node type.
*
* @ingroup views_filter_handlers
*/
class views_handler_filter_node_type extends views_handler_filter_in_operator {
/**
* {@inheritdoc}
*/
public function get_value_options() {
if (!isset($this->value_options)) {
$this->value_title = t('Content types');
$types = node_type_get_types();
$options = array();
foreach ($types as $type => $info) {
$options[$type] = t($info->name);
}
asort($options);
$this->value_options = $options;
}
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
views_handler_filter_node_type | Filter by node type. |