You are here

function commerce_search_api_backreference_getter in Commerce Search API 7

Getter callback for retrieving related entities.

1 string reference to 'commerce_search_api_backreference_getter'
commerce_search_api_entity_property_info_alter in ./commerce_search_api.module
Implements hook_entity_property_info_alter().

File

./commerce_search_api.module, line 110
Provides Search API integration for Drupal Commerce.

Code

function commerce_search_api_backreference_getter($product, array $options, $name, $type, $info) {
  $field = $info['field'];
  $target_type = $info['target type'];
  return commerce_search_api_get_related_entities($product, $field['field_name'], $target_type);
}