1 path.module path_field_attach_delete_bundle($entity_type, $bundle)

Implements hook_field_attach_delete_bundle().

Respond to sub-types being deleted, their patterns can be removed.

File

core/modules/path/path.module, line 568
Enables users to customize URLs and provide automatic URL alias patterns.

Code

function path_field_attach_delete_bundle($entity_type, $bundle) {
  $config = config('path.settings');
  $path_config_data = $config->get();
  foreach ($path_config_data as $config_key => $config_value) {
    if (strpos($config_key, "{$entity_type}_{$bundle}_") === 0) {
      $config->clear($config_key);
    }
  }
  $config->save();
}