Mercurial > hg > isophonics-drupal-site
view core/modules/path/path.install @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
<?php /** * @file * Update functions for the path module. */ /** * Change the path field to computed for node and taxonomy_term. */ function path_update_8200() { $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); foreach (['node', 'taxonomy_term'] as $entity_type_id) { if ($entity_definition_update_manager->getEntityType($entity_type_id)) { // Computed field definitions are not tracked by the entity definition // update manager, so remove them. $storage_definition = $entity_definition_update_manager->getFieldStorageDefinition('path', $entity_type_id); if ($storage_definition) { $entity_definition_update_manager->uninstallFieldStorageDefinition($storage_definition); } } } }