public function SqlContentEntityStorage::onFieldStorageDefinitionCreate in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::onFieldStorageDefinitionCreate()
- 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::onFieldStorageDefinitionCreate()
Reacts to the creation of a field storage definition.
Parameters
\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The definition being created.
Overrides ContentEntityStorageBase::onFieldStorageDefinitionCreate
File
- core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php, line 1526
Class
- SqlContentEntityStorage
- A content entity database storage implementation.
Namespace
Drupal\Core\Entity\SqlCode
public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) {
$this
->wrapSchemaException(function () use ($storage_definition) {
$this
->getStorageSchema()
->onFieldStorageDefinitionCreate($storage_definition);
$this->fieldStorageDefinitions[$storage_definition
->getName()] = $storage_definition;
$this->tableMapping = NULL;
});
}