Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / path / path.install
1 <?php
2
3 /**
4  * @file
5  * Update functions for the path module.
6  */
7
8 /**
9  * Change the path field to computed for node and taxonomy_term.
10  */
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);
20       }
21     }
22   }
23 }