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