From dcc5155617d0d42bcfd6eccb3244c3b426f974d8 Mon Sep 17 00:00:00 2001 From: Stanislav Kutasevits Date: Mon, 18 May 2026 17:19:26 +0300 Subject: [PATCH] OS-219 adding config object delete on uninstall --- CHANGELOG.md | 4 ++-- .../os2forms_encrypt/os2forms_encrypt.install | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f722099..cf8e8a0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,11 +27,11 @@ before starting to add changes. Use example [placed in the end of the page](#exa Updated code analysis script. - [PR-306](https://github.com/OS2Forms/os2forms/pull/306) Made digital signature text placement configurable. -- [#251](https://github.com/OS2Forms/os2forms/issues/251) - Webform encrypt uninstall problem fix - git actions check - [PR-289](https://github.com/OS2Forms/os2forms/pull/289) Added required "Zoom control position" to map element +- [#251](https://github.com/OS2Forms/os2forms/issues/251) + Updated Webform encrypt uninstall problem fix ## [5.0.0] 2025-11-18 diff --git a/modules/os2forms_encrypt/os2forms_encrypt.install b/modules/os2forms_encrypt/os2forms_encrypt.install index 0a42e4ee..010722a4 100644 --- a/modules/os2forms_encrypt/os2forms_encrypt.install +++ b/modules/os2forms_encrypt/os2forms_encrypt.install @@ -17,3 +17,19 @@ function os2forms_encrypt_install() { module_set_weight('os2forms_encrypt', 9999); } + +/** + * Implements hook_uninstall(). + */ +function os2forms_encrypt_uninstall(): void { + $config_factory = \Drupal::configFactory(); + + $configs = [ + 'encrypt.profile.webform', + 'key.key.webform', + ]; + + foreach ($configs as $config_name) { + $config_factory->getEditable($config_name)->delete(); + } +}