You are here

function nodereferrer_nodereference_field_options in NodeReferrer 6

Same name and namespace in other branches
  1. 5 nodereferrer.module \nodereferrer_nodereference_field_options()

Helper function to create an options list of nodereference fields.

11 calls to nodereferrer_nodereference_field_options()
nodereferrer_field_settings in ./nodereferrer.module
Implementation of hook_field_settings().
nodereferrer_view_handler_argument_field::get_node_list in views/nodereferrer_view_handler_argument_field.inc
This should be overriden by descendant classes
nodereferrer_view_handler_argument_field::get_options in views/nodereferrer_view_handler_argument_field.inc
nodereferrer_view_handler_argument_type::get_node_list in views/nodereferrer_view_handler_argument_type.inc
This should be overriden by descendant classes
nodereferrer_view_handler_field_field::get_item_list in views/nodereferrer_view_handler_field_field.inc

... See full list

File

./nodereferrer.module, line 451
Defines a field type for backlinking referencing nodes.

Code

function nodereferrer_nodereference_field_options() {
  $options = array();
  $types = content_fields();
  foreach ($types as $type) {
    if ($type['type'] == 'nodereference') {
      $options[$type['field_name']] = $type['field_name'] . ' (' . $type['widget']['label'] . ')';
    }
  }
  return $options;
}