You are here

public function EntityLastInstalledSchemaRepository::setLastInstalledFieldStorageDefinitions in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledFieldStorageDefinitions()
  2. 10 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledFieldStorageDefinitions()

Stores the entity type's field storage definitions in the application state.

Parameters

string $entity_type_id: The entity type identifier.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $storage_definitions: An array of field storage definitions.

Overrides EntityLastInstalledSchemaRepositoryInterface::setLastInstalledFieldStorageDefinitions

2 calls to EntityLastInstalledSchemaRepository::setLastInstalledFieldStorageDefinitions()
EntityLastInstalledSchemaRepository::deleteLastInstalledFieldStorageDefinition in core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php
Deletes the field storage definition from the application state.
EntityLastInstalledSchemaRepository::setLastInstalledFieldStorageDefinition in core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php
Stores the field storage definition in the application state.

File

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

Class

EntityLastInstalledSchemaRepository
Provides a repository for installed entity definitions.

Namespace

Drupal\Core\Entity

Code

public function setLastInstalledFieldStorageDefinitions($entity_type_id, array $storage_definitions) {
  $this->keyValueFactory
    ->get('entity.definitions.installed')
    ->set($entity_type_id . '.field_storage_definitions', $storage_definitions);
}