public static function Role::supportsIndex in Search API Sort Priority 8
Can only be enabled for an index that indexes user related entity.
Overrides ProcessorPluginBase::supportsIndex
File
- src/
Plugin/ search_api/ processor/ Role.php, line 45
Class
- Role
- Adds customized sort priority by Role.
Namespace
Drupal\search_api_sort_priority\Plugin\search_api\processorCode
public static function supportsIndex(IndexInterface $index) {
foreach ($index
->getDatasources() as $datasource) {
if ($datasource
->getEntityTypeId() == 'node') {
return TRUE;
}
}
return FALSE;
}