You are here

public function SearchApiAlterCallbackInterface::supportsIndex in Search API 7

Check whether this data-alter callback is applicable for a certain index.

This can be used for hiding the callback on the index's "Filters" tab. To avoid confusion, you should only use criteria that are immutable, such as the index's entity type. Also, since this is only used for UI purposes, you should not completely rely on this to ensure certain index configurations and at least throw an exception with a descriptive error message if this is violated on runtime.

Parameters

SearchApiIndex $index: The index to check for.

Return value

boolean TRUE if the callback can run on the given index; FALSE otherwise.

1 method overrides SearchApiAlterCallbackInterface::supportsIndex()
SearchApiAbstractAlterCallback::supportsIndex in includes/callback.inc
Implements SearchApiAlterCallbackInterface::supportsIndex().

File

includes/callback.inc, line 42
Contains base definitions for data alterations.

Class

SearchApiAlterCallbackInterface
Interface representing a Search API data-alter callback.

Code

public function supportsIndex(SearchApiIndex $index);