protected function SqlContentEntityStorageSchema::checkEntityType in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::checkEntityType()
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
4 calls to SqlContentEntityStorageSchema::checkEntityType()
- SqlContentEntityStorageSchema::getEntitySchema in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorageSchema.php - Gets the entity schema for the specified entity type.
- SqlContentEntityStorageSchema::onEntityTypeCreate in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorageSchema.php - Reacts to the creation of the entity type.
- SqlContentEntityStorageSchema::onEntityTypeDelete in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorageSchema.php - Reacts to the deletion of the entity type.
- SqlContentEntityStorageSchema::onEntityTypeUpdate in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorageSchema.php - Reacts to the update of the entity type.
File
- core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorageSchema.php, line 468 - Contains \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema.
Class
- SqlContentEntityStorageSchema
- Defines a schema handler that supports revisionable, translatable entities.
Namespace
Drupal\Core\Entity\SqlCode
protected function checkEntityType(EntityTypeInterface $entity_type) {
if ($entity_type
->id() != $this->entityType
->id()) {
throw new EntityStorageException("Unsupported entity type {$entity_type->id()}");
}
return TRUE;
}