You are here

function hook_search_api_item_type_info_alter in Search API 7

Alter the item type info.

Modules may implement this hook to alter the information that defines an item type. All properties that are available in hook_search_api_item_type_info() can be altered here, with the addition of the "module" key specifying the module that originally defined the type.

Parameters

array $infos: The item type info array, keyed by type identifier.

See also

hook_search_api_item_type_info()

1 invocation of hook_search_api_item_type_info_alter()
search_api_get_item_type_info in ./search_api.module
Returns information for either all item types, or a specific one.

File

./search_api.api.php, line 138
Hooks provided by the Search API module.

Code

function hook_search_api_item_type_info_alter(array &$infos) {

  // Adds a boolean value is_entity to all type options telling whether the item
  // type represents an entity type.
  foreach ($infos as $type => $info) {
    $info['is_entity'] = (bool) entity_get_info($type);
  }
}