protected EntityDefinitionUpdateManager::doEntityUpdate($op, $entity_type_id)
Performs an entity type definition update.
Parameters
string $op: The operation to perform, either static::DEFINITION_CREATED or static::DEFINITION_UPDATED.
string $entity_type_id: The entity type ID.
File
- core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php, line 206
Class
- EntityDefinitionUpdateManager
- Manages entity definition updates.
Namespace
Drupal\Core\Entity
Code
protected function doEntityUpdate($op, $entity_type_id) { $entity_type = $this->entityManager->getDefinition($entity_type_id); switch ($op) { case static::DEFINITION_CREATED: $this->entityManager->onEntityTypeCreate($entity_type); break; case static::DEFINITION_UPDATED: $original = $this->entityManager->getLastInstalledDefinition($entity_type_id); $this->entityManager->onEntityTypeUpdate($entity_type, $original); break; } }
Please login to continue.