protected function ContentEntityType::checkStorageClass in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/ContentEntityType.php \Drupal\Core\Entity\ContentEntityType::checkStorageClass()
Throws
\InvalidArgumentException If the provided class does not implement \Drupal\Core\Entity\ContentEntityStorageInterface.
Overrides EntityType::checkStorageClass
See also
\Drupal\Core\Entity\ContentEntityStorageInterface
File
- core/
lib/ Drupal/ Core/ Entity/ ContentEntityType.php, line 70
Class
- ContentEntityType
- Provides an implementation of a content entity type and its metadata.
Namespace
Drupal\Core\EntityCode
protected function checkStorageClass($class) {
$required_interface = ContentEntityStorageInterface::class;
if (!is_subclass_of($class, $required_interface)) {
throw new \InvalidArgumentException("{$class} does not implement {$required_interface}");
}
}