Skip to content

Commit

Permalink
Add hook_uninstall for social_path_manager module
Browse files Browse the repository at this point in the history
  • Loading branch information
tbsiqueira committed Dec 4, 2024
1 parent 7c62d53 commit 9fd8857
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/custom/social_path_manager/social_path_manager.install
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,20 @@ function social_path_manager_install() {
]
);
}

/**
* Implements hook_uninstall().
*/
function social_path_manager_uninstall(): void {
$config_factory = \Drupal::configFactory();

$installed_configs = [
'pathauto.pattern.default_content_types',
'pathauto.pattern.default_group_types',
'pathauto.pattern.default_taxonomy_terms',
];

foreach ($installed_configs as $config) {
$config_factory->getEditable($config)->delete();
}
}

0 comments on commit 9fd8857

Please sign in to comment.