You are here

public function SearchApiFederatedSolrSiteName::supportsIndex in Search API Federated Solr 7

Same name and namespace in other branches
  1. 7.3 src/SearchApiFederatedSolrSiteName.php \SearchApiFederatedSolrSiteName::supportsIndex()
  2. 7.2 src/SearchApiFederatedSolrSiteName.php \SearchApiFederatedSolrSiteName::supportsIndex()

Implements SearchApiAlterCallbackInterface::supportsIndex().

The default implementation always returns TRUE.

Overrides SearchApiAbstractAlterCallback::supportsIndex

File

src/SearchApiFederatedSolrSiteName.php, line 16

Class

SearchApiFederatedSolrSiteName
Class SearchApiFederatedSolrSiteName Provides a Search API index data alteration that adds a "Site Name" property to each indexed item.

Code

public function supportsIndex(SearchApiIndex $index) {

  // Code in this class assumes that it is working with nodes.
  return $index
    ->getEntityType() == 'node';
}