You are here

protected function SearchApiCombinedEntityDataSourceController::getSelectedEntityTypeOptions in Search API 7

Returns the selected entity type options for this datasource.

Depends on the index from which this method is (indirectly) called.

Parameters

SearchApiIndex $index: (optional) The index for which to get the enabled entity types. If not given, will be determined automatically.

Return value

string[] An associative array, mapping the machine names of the enabled entity types to their labels.

Throws

SearchApiException Thrown if the active index could not be determined.

2 calls to SearchApiCombinedEntityDataSourceController::getSelectedEntityTypeOptions()
SearchApiCombinedEntityDataSourceController::getConfigurationSummary in includes/datasource_multiple.inc
Returns a summary of an index's current datasource configuration.
SearchApiCombinedEntityDataSourceController::getPropertyInfo in includes/datasource_multiple.inc
Retrieves the property info for this item type.

File

includes/datasource_multiple.inc, line 356
Contains SearchApiCombinedEntityDataSourceController.

Class

SearchApiCombinedEntityDataSourceController
Provides a datasource for indexing multiple types of entities.

Code

protected function getSelectedEntityTypeOptions(SearchApiIndex $index = NULL) {
  return array_intersect_key(search_api_entity_type_options_list(), $this
    ->getEntityTypes($index));
}