You are here

public function SqlContentEntityStorage::onFieldableEntityTypeCreate in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::onFieldableEntityTypeCreate()
  2. 10 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::onFieldableEntityTypeCreate()

Reacts to the creation of the fieldable entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type being created.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $field_storage_definitions: The entity type's field storage definitions.

Overrides EntityTypeListenerInterface::onFieldableEntityTypeCreate

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 1503

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

public function onFieldableEntityTypeCreate(EntityTypeInterface $entity_type, array $field_storage_definitions) {
  $this
    ->wrapSchemaException(function () use ($entity_type, $field_storage_definitions) {
    $this
      ->getStorageSchema()
      ->onFieldableEntityTypeCreate($entity_type, $field_storage_definitions);
  });
}