EntityDefinitionUpdateManager::updateEntityType

public EntityDefinitionUpdateManager::updateEntityType(EntityTypeInterface $entity_type)

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 141

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

public function updateEntityType(EntityTypeInterface $entity_type) {
  $original = $this->getEntityType($entity_type->id());
  $this->entityManager->clearCachedDefinitions();
  $this->entityManager->onEntityTypeUpdate($entity_type, $original);
}
doc_Drupal
2016-10-29 09:05:01
Comments
Leave a Comment

Please login to continue.