You are here

function nodereferrer_nodereference_field_options in NodeReferrer 5

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

Helper function to create an options list of nodereference fields.

7 calls to nodereferrer_nodereference_field_options()
nodereferrer_field_settings in ./nodereferrer.module
Implementation of hook_field_settings().
nodereferrer_views_arguments in ./nodereferrer.module
Implementation of hook_views_arguments().
nodereferrer_views_tables in ./nodereferrer.module
Implementation of hook_views_tables
nodereferrer_view_handler_argument_field_filter in ./nodereferrer.module
nodereferrer_view_handler_argument_type_filter in ./nodereferrer.module

... See full list

File

./nodereferrer.module, line 319
Defines a field type for backlinking referencing nodes. @todo -clear content cache with nodeapi. -query nids for access on load/view..

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;
}