Mercurial > hg > isophonics-drupal-site
annotate core/modules/path/path.install @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 /** |
Chris@0 | 4 * @file |
Chris@0 | 5 * Update functions for the path module. |
Chris@0 | 6 */ |
Chris@0 | 7 |
Chris@0 | 8 /** |
Chris@0 | 9 * Change the path field to computed for node and taxonomy_term. |
Chris@0 | 10 */ |
Chris@0 | 11 function path_update_8200() { |
Chris@0 | 12 $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); |
Chris@0 | 13 foreach (['node', 'taxonomy_term'] as $entity_type_id) { |
Chris@0 | 14 if ($entity_definition_update_manager->getEntityType($entity_type_id)) { |
Chris@0 | 15 // Computed field definitions are not tracked by the entity definition |
Chris@0 | 16 // update manager, so remove them. |
Chris@0 | 17 $storage_definition = $entity_definition_update_manager->getFieldStorageDefinition('path', $entity_type_id); |
Chris@0 | 18 if ($storage_definition) { |
Chris@0 | 19 $entity_definition_update_manager->uninstallFieldStorageDefinition($storage_definition); |
Chris@0 | 20 } |
Chris@0 | 21 } |
Chris@0 | 22 } |
Chris@0 | 23 } |