You are here

public function SearchApiIndex::getEntityType in Search API 7

Get the entity type of items in this index.

Return value

string|null An entity type string if the items in this index are entities; NULL otherwise.

File

includes/index_entity.inc, line 389
Contains SearchApiIndex.

Class

SearchApiIndex
Class representing a search index.

Code

public function getEntityType() {
  try {
    return $this
      ->datasource()
      ->getEntityType();
  } catch (SearchApiException $e) {
    return NULL;
  }
}