public static function ProcessorPluginBase::supportsIndex in Search API 8
Checks whether this processor is applicable for a certain index.
This can be used for hiding the processor on the index's "Filters" tab. To avoid confusion, you should only use criteria that are more or less constant, such as the index's datasources. 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
\Drupal\search_api\IndexInterface $index: The index to check for.
Return value
bool TRUE if the processor can run on the given index; FALSE otherwise.
Overrides ProcessorInterface::supportsIndex
8 methods override ProcessorPluginBase::supportsIndex()
- AddHierarchy::supportsIndex in src/
Plugin/ search_api/ processor/ AddHierarchy.php - Checks whether this processor is applicable for a certain index.
- ContentAccess::supportsIndex in src/
Plugin/ search_api/ processor/ ContentAccess.php - Checks whether this processor is applicable for a certain index.
- EntityStatus::supportsIndex in src/
Plugin/ search_api/ processor/ EntityStatus.php - Checks whether this processor is applicable for a certain index.
- ReverseEntityReferences::supportsIndex in src/
Plugin/ search_api/ processor/ ReverseEntityReferences.php - Checks whether this processor is applicable for a certain index.
- RoleFilter::supportsIndex in src/
Plugin/ search_api/ processor/ RoleFilter.php - Can only be enabled for an index that indexes the user entity.
File
- src/
Processor/ ProcessorPluginBase.php, line 99
Class
- ProcessorPluginBase
- Defines a base class from which other processors may extend.
Namespace
Drupal\search_api\ProcessorCode
public static function supportsIndex(IndexInterface $index) {
return TRUE;
}