You are here

public function SqlContentEntityStorageSchema::onFieldStorageDefinitionCreate in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::onFieldStorageDefinitionCreate()
  2. 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::onFieldStorageDefinitionCreate()

Reacts to the creation of a field storage definition.

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The definition being created.

Overrides FieldStorageDefinitionListenerInterface::onFieldStorageDefinitionCreate

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 693

Class

SqlContentEntityStorageSchema
Defines a schema handler that supports revisionable, translatable entities.

Namespace

Drupal\Core\Entity\Sql

Code

public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) {
  $this->fieldStorageDefinitions[$storage_definition
    ->getName()] = $storage_definition;
  $this
    ->performFieldSchemaOperation('create', $storage_definition);
}