protected static function SearchApiAlterBundleFilter::hasBundles in Search API 7
Determines whether a certain entity type has any bundles.
Parameters
array $entity_info: The entity type's entity_get_info() array.
Return value
bool TRUE if the entity type has bundles, FALSE otherwise.
3 calls to SearchApiAlterBundleFilter::hasBundles()
- SearchApiAlterBundleFilter::alterItems in includes/
callback_bundle_filter.inc - Alter items before indexing.
- SearchApiAlterBundleFilter::configurationForm in includes/
callback_bundle_filter.inc - Implements SearchApiAlterCallbackInterface::configurationForm().
- SearchApiAlterBundleFilter::supportsIndex in includes/
callback_bundle_filter.inc - Implements SearchApiAlterCallbackInterface::supportsIndex().
File
- includes/
callback_bundle_filter.inc, line 131 - Contains SearchApiAlterBundleFilter.
Class
- SearchApiAlterBundleFilter
- Represents a data alteration that restricts entity indexes to some bundles.
Code
protected static function hasBundles(array $entity_info) {
return !empty($entity_info['entity keys']['bundle']) && !empty($entity_info['bundles']);
}