You are here

function apachesolr_cck_userreference_field_callback in Apache Solr Search 6.2

Same name and namespace in other branches
  1. 5.2 apachesolr.module \apachesolr_cck_userreference_field_callback()

Use the content.module's content_format() to format the field based on its uid ($facet).

Parameters

string $facet: The indexed value @param array $options An array of options including the hook_block $delta.

1 string reference to 'apachesolr_cck_userreference_field_callback'
apachesolr_cck_fields in ./apachesolr.module
Invokes hook_apachesolr_cck_field_mappings to find out how to handle CCK fields.

File

./apachesolr.module, line 2110
Integration with the Apache Solr search application.

Code

function apachesolr_cck_userreference_field_callback($facet, $options) {
  if (function_exists('content_format')) {
    return strip_tags(content_format($options['delta'], array(
      'uid' => $facet,
    )));
  }
  else {
    return $facet;
  }
}