You are here

public function EntityDefinitionUpdateManager::updateEntityType in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::updateEntityType()

Applies any change performed to the passed entity type definition.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

Overrides EntityDefinitionUpdateManagerInterface::updateEntityType

File

core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php, line 156

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

public function updateEntityType(EntityTypeInterface $entity_type) {
  $original = $this
    ->getEntityType($entity_type
    ->id());
  $this
    ->clearCachedDefinitions();
  $this->entityTypeListener
    ->onEntityTypeUpdate($entity_type, $original);
}