You are here

function pathauto_update_8104 in Pathauto 8

Resave patterns so that lookup keys are updated.

File

./pathauto.install, line 254
Install, update, and uninstall functions for Pathauto.

Code

function pathauto_update_8104() {
  \Drupal::entityTypeManager()
    ->clearCachedDefinitions();

  // Load all pattern configuration entities and save them, so that the new
  // status lookup keys are saved.
  foreach (\Drupal::configFactory()
    ->listAll('pathauto.pattern.') as $pattern_config_name) {
    $pattern_config = \Drupal::configFactory()
      ->getEditable($pattern_config_name);
    $pattern_config
      ->save();
  }
}