function SqlContentEntityStorage::onFieldStorageDefinitionCreate

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::onFieldStorageDefinitionCreate()
  2. 10 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::onFieldStorageDefinitionCreate()
  3. 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::onFieldStorageDefinitionCreate()

Overrides ContentEntityStorageBase::onFieldStorageDefinitionCreate

File

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

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

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;
    });
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.