public function 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);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityDefinitionUpdateManager.php/function/EntityDefinitionUpdateManager::updateEntityType/8.1.x