public function EntityLastInstalledSchemaRepository::setLastInstalledDefinition in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledDefinition()
- 9 core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::setLastInstalledDefinition()
File
- core/
lib/ Drupal/ Core/ Entity/ EntityLastInstalledSchemaRepository.php, line 91
Class
- EntityLastInstalledSchemaRepository
- Provides a repository for installed entity definitions.
Namespace
Drupal\Core\EntityCode
public function setLastInstalledDefinition(EntityTypeInterface $entity_type) {
$entity_type_id = $entity_type
->id();
$this->keyValueFactory
->get('entity.definitions.installed')
->set($entity_type_id . '.entity_type', $entity_type);
$this->cacheBackend
->delete('entity_type_definitions.installed');
$this->entityTypeDefinitions = NULL;
return $this;
}