You are here

public function SearchApiAlterAddViewedEntity::supportsIndex in Search API 7

Only support indexes containing entities.

Overrides SearchApiAbstractAlterCallback::supportsIndex

See also

SearchApiAlterCallbackInterface::supportsIndex()

File

includes/callback_add_viewed_entity.inc, line 18
Contains SearchApiAlterAddViewedEntity.

Class

SearchApiAlterAddViewedEntity
Search API data alteration callback that adds an URL field for all items.

Code

public function supportsIndex(SearchApiIndex $index) {
  return (bool) $index
    ->getEntityType();
}