You are here

nodereferrer_view_handler_field_type.inc in NodeReferrer 6

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

nodereferrer.module Views integration

File

views/nodereferrer_view_handler_field_type.inc
View source
<?php

/**
 * @file
 * nodereferrer.module Views integration
 */

/**
 * Views handler to get fields by nodereferrer types
 */
class nodereferrer_view_handler_field_type extends nodereferrer_view_handler_field {
  function get_options_title() {
    return t('From node type');
  }
  function get_options() {
    return node_get_types('names');
  }
  function get_item_list($nid) {
    $fields = array_keys(nodereferrer_nodereference_field_options());
    $node_type = array_filter($this->options['fields']);
    if (empty($node_type)) {
      $node_type = array_keys(node_get_types('names'));
    }
    return $this
      ->referrers($nid, $fields, $node_type);
  }

}

Classes

Namesort descending Description
nodereferrer_view_handler_field_type Views handler to get fields by nodereferrer types