path.install

Same filename and directory in other branches
  1. 9 core/modules/path/path.install
  2. 10 core/modules/path/path.install
  3. 11.x core/modules/path/path.install

Update functions for the path module.

File

core/modules/path/path.install

View 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);
            }
        }
    }
}

Functions

Title Deprecated Summary
path_update_8200 Change the path field to computed for node and taxonomy_term.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.