You are here

apachesolr_views_handler_argument_node_type.inc in Apache Solr Views 6

defines a class to handle node type arguments

File

handlers/apachesolr_views_handler_argument_node_type.inc
View source
<?php

/**
 * @file
 * defines a class to handle node type arguments
 */
class apachesolr_views_handler_argument_node_type extends apachesolr_views_handler_argument {
  function title() {
    return $this
      ->node_type($this->argument);
  }
  function node_type($type) {
    $output = node_get_types('name', $type);
    if (empty($output)) {
      return t('Unknown node type');
    }
    else {
      return check_plain(t($output));
    }
  }

}

Classes

Namesort descending Description
apachesolr_views_handler_argument_node_type @file defines a class to handle node type arguments