You are here

function search_api_combined_bundle_options_list in Search API 7

Options list callback for entity type bundles.

Will include all bundles for all entity types which specify entity property information, in a format combining both entity type and bundle.

Return value

string[] An array of bundle identifiers mapped to their human-readable names.

1 string reference to 'search_api_combined_bundle_options_list'
SearchApiCombinedEntityDataSourceController::getPropertyInfo in includes/datasource_multiple.inc
Retrieves the property info for this item type.

File

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

Code

function search_api_combined_bundle_options_list() {
  $types = array();
  foreach (array_keys(entity_get_property_info()) as $type) {
    $info = entity_get_info($type);
    if (!empty($info['bundles'])) {
      foreach ($info['bundles'] as $bundle => $bundle_info) {
        $types["{$type}:{$bundle}"] = $bundle_info['label'];
      }
    }
  }
  return $types;
}