You are here

nodereferrer_view_handler_argument_field.inc in NodeReferrer 7

Same filename and directory in other branches
  1. 6 views/nodereferrer_view_handler_argument_field.inc

nodereferrer.module Views integration

File

views/nodereferrer_view_handler_argument_field.inc
View source
<?php

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

/**
 * Views handler to filter nodes by nodereferer fields
 */
class nodereferrer_view_handler_argument_field extends nodereferrer_view_handler_argument {
  function get_options_title() {
    return t('Using field');
  }
  function get_options() {
    return nodereferrer_nodereference_field_options();
  }
  function get_node_list() {
    $nid = (int) $this->argument;
    if (empty($this->options['fields'])) {
      $fields = array_keys(nodereferrer_nodereference_field_options());
    }
    else {
      $fields = array_keys(array_filter($this->options['fields']));
    }
    return $this
      ->referrers($nid, $fields);
  }

}

Classes

Namesort descending Description
nodereferrer_view_handler_argument_field Views handler to filter nodes by nodereferer fields