public function MultiversionManager::isSupportedEntityType in Multiversion 8
Same name and namespace in other branches
- 8.2 src/MultiversionManager.php \Drupal\multiversion\MultiversionManager::isSupportedEntityType()
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type:
Return value
boolean
Overrides MultiversionManagerInterface::isSupportedEntityType
2 calls to MultiversionManager::isSupportedEntityType()
File
- src/
MultiversionManager.php, line 183
Class
Namespace
Drupal\multiversionCode
public function isSupportedEntityType(EntityTypeInterface $entity_type) {
$supported_entity_types = \Drupal::config('multiversion.settings')
->get('supported_entity_types') ?: [];
if (empty($supported_entity_types)) {
return FALSE;
}
if (!in_array($entity_type
->id(), $supported_entity_types)) {
return FALSE;
}
return $entity_type instanceof ContentEntityTypeInterface;
}