function EntityLastInstalledSchemaRepository::deleteLastInstalledFieldStorageDefinition

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::deleteLastInstalledFieldStorageDefinition()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::deleteLastInstalledFieldStorageDefinition()
  3. 10 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::deleteLastInstalledFieldStorageDefinition()

Overrides EntityLastInstalledSchemaRepositoryInterface::deleteLastInstalledFieldStorageDefinition

File

core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php, line 146

Class

EntityLastInstalledSchemaRepository
Provides a repository for installed entity definitions.

Namespace

Drupal\Core\Entity

Code

public function deleteLastInstalledFieldStorageDefinition(FieldStorageDefinitionInterface $storage_definition) {
    $entity_type_id = $storage_definition->getTargetEntityTypeId();
    $definitions = $this->getLastInstalledFieldStorageDefinitions($entity_type_id);
    unset($definitions[$storage_definition->getName()]);
    $this->setLastInstalledFieldStorageDefinitions($entity_type_id, $definitions);
}

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