public function EntityLastInstalledSchemaRepository::deleteLastInstalledFieldStorageDefinition in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::deleteLastInstalledFieldStorageDefinition()
Deletes the field storage definition from the application state.
Parameters
\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The field storage definition.
Overrides EntityLastInstalledSchemaRepositoryInterface::deleteLastInstalledFieldStorageDefinition
File
- core/
lib/ Drupal/ Core/ Entity/ EntityLastInstalledSchemaRepository.php, line 107
Class
- EntityLastInstalledSchemaRepository
- Provides a repository for installed entity definitions.
Namespace
Drupal\Core\EntityCode
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);
}