5 * Update functions for the path module.
9 * Change the path field to computed for node and taxonomy_term.
11 function path_update_8200() {
12 $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager();
13 foreach (['node', 'taxonomy_term'] as $entity_type_id) {
14 if ($entity_definition_update_manager->getEntityType($entity_type_id)) {
15 // Computed field definitions are not tracked by the entity definition
16 // update manager, so remove them.
17 $storage_definition = $entity_definition_update_manager->getFieldStorageDefinition('path', $entity_type_id);
18 if ($storage_definition) {
19 $entity_definition_update_manager->uninstallFieldStorageDefinition($storage_definition);