function EntityLastInstalledSchemaRepository::setLastInstalledFieldStorageDefinition

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

Overrides EntityLastInstalledSchemaRepositoryInterface::setLastInstalledFieldStorageDefinition

File

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

Class

EntityLastInstalledSchemaRepository
Provides a repository for installed entity definitions.

Namespace

Drupal\Core\Entity

Code

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

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