You are here

function search_api_entity_type_options_list in Search API 7

Options list callback for entity types.

Will only include entity types which specify entity property information.

Return value

string[] An array of entity type machine names mapped to their human-readable names.

4 calls to search_api_entity_type_options_list()
SearchApiCombinedEntityDataSourceController::configurationForm in includes/datasource_multiple.inc
Form constructor for configuring the datasource for a given index.
SearchApiCombinedEntityDataSourceController::getSelectedEntityTypeOptions in includes/datasource_multiple.inc
Returns the selected entity type options for this datasource.
SearchApiViewsHandlerArgumentMoreLikeThis::options_form in contrib/search_api_views/includes/handler_argument_more_like_this.inc
Extend the options form a bit.
search_api_search_api_item_type_info in ./search_api.module
Implements hook_search_api_item_type_info().
1 string reference to 'search_api_entity_type_options_list'
SearchApiCombinedEntityDataSourceController::getPropertyInfo in includes/datasource_multiple.inc
Retrieves the property info for this item type.

File

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

Code

function search_api_entity_type_options_list() {
  $types = array();
  foreach (array_keys(entity_get_property_info()) as $type) {
    $info = entity_get_info($type);
    if ($info) {
      $types[$type] = $info['label'];
    }
  }
  return $types;
}