You are here

protected function SearchApiAttachmentsReferencesAlterSettings::getReferenceFields in Search API attachments 7

1 call to SearchApiAttachmentsReferencesAlterSettings::getReferenceFields()
SearchApiAttachmentsReferencesAlterSettings::alterItems in contrib/search_api_attachments_references/includes/callback_attachments_references_settings.inc
Alter items before indexing.

File

contrib/search_api_attachments_references/includes/callback_attachments_references_settings.inc, line 114
Search API data alteration callback.

Class

SearchApiAttachmentsReferencesAlterSettings

Code

protected function getReferenceFields() {
  $ret = array();
  foreach (field_info_fields() as $name => $field) {
    if ($field['type'] == 'node_reference') {
      $field['settings']['target_type'] = 'node';
      $ret[$name] = $field;
    }
  }
  return $ret;
}