You are here

function _search_api_wrapper_add_all_properties in Search API 7

Helper function to be used as a "property info alter" callback.

If a wrapped entity is passed to this function, all its available properties and fields, regardless of bundle, are added to the wrapper.

1 string reference to '_search_api_wrapper_add_all_properties'
SearchApiIndex::entityWrapper in includes/index_entity.inc
Helper function for creating an entity metadata wrapper appropriate for this index.

File

./search_api.module, line 3224
Provides a flexible framework for implementing search services.

Code

function _search_api_wrapper_add_all_properties(EntityMetadataWrapper $wrapper, array $property_info) {
  if ($properties = entity_get_all_property_info($wrapper
    ->type())) {
    $property_info['properties'] = $properties;
  }
  return $property_info;
}