You are here

function _nodereferrer_nodereference_field_options in NodeReferrer 7

Helper function to create an options list of nodereference fields.

3 calls to _nodereferrer_nodereference_field_options()
nodereferrer_field_settings_form in ./nodereferrer.module
Implements hook_field_settings_form().
nodereferrer_referrers in ./nodereferrer.module
Gets an array of referrer nids, by node.type & field.type
nodereferrer__field_settings in ./nodereferrer.module
Implements of hook_field_settings().

File

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

Code

function _nodereferrer_nodereference_field_options() {
  $options = drupal_static(__FUNCTION__, FALSE);
  if ($options === FALSE) {
    $options = array();
    $fields = field_info_fields();
    foreach ($fields as $field_name => $field) {
      if ($field['type'] == 'node_reference') {
        $options[$field_name] = $field['field_name'];
      }
    }
  }
  return $options;
}