protected SqlContentEntityStorageSchema::checkEntityType(EntityTypeInterface $entity_type)
Checks that we are dealing with the correct entity type.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type to be checked.
Return value
bool TRUE if the entity type matches the current one.
Throws
\Drupal\Core\Entity\EntityStorageException
File
- core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 463
Class
- SqlContentEntityStorageSchema
- Defines a schema handler that supports revisionable, translatable entities.
Namespace
Drupal\Core\Entity\Sql
Code
1 2 3 4 5 6 | protected function checkEntityType(EntityTypeInterface $entity_type ) { if ( $entity_type ->id() != $this ->entityType->id()) { throw new EntityStorageException( "Unsupported entity type {$entity_type->id()}" ); } return TRUE; } |
Please login to continue.