From b99cb62ec7dc3c40815100e33fa6e2d724d61fde Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Mon, 16 Dec 2024 11:40:29 -0800 Subject: [PATCH] Add and configure trash module for soft deleteing content --- composer.json | 1 + config/sync/core.extension.yml | 1 + config/sync/trash.settings.yml | 7 +++++++ config/sync/ultimate_cron.job.trash_cron.yml | 17 +++++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 config/sync/trash.settings.yml create mode 100644 config/sync/ultimate_cron.job.trash_cron.yml diff --git a/composer.json b/composer.json index 5cf241973..bd04cf902 100644 --- a/composer.json +++ b/composer.json @@ -137,6 +137,7 @@ "drupal/taxonomy_entity_index": "^1.8", "drupal/taxonomy_menu": "^3.5", "drupal/token_or": "^2.0", + "drupal/trash": "^3.0", "drupal/ui_patterns": "^1.0", "drupal/ultimate_cron": "^2.0@beta", "drupal/view_unpublished": "^1.0", diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 59ed57c88..0616545f3 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -218,6 +218,7 @@ module: token: 0 token_or: 0 toolbar: 0 + trash: 0 typed_data: 0 ui_patterns: 0 ui_patterns_ds: 0 diff --git a/config/sync/trash.settings.yml b/config/sync/trash.settings.yml new file mode 100644 index 000000000..4c14eb64c --- /dev/null +++ b/config/sync/trash.settings.yml @@ -0,0 +1,7 @@ +_core: + default_config_hash: 6RYN2q1x9xeZY4gCN37ZqpEgHrLUQKEscWRd9UovdL0 +enabled_entity_types: + node: { } +auto_purge: + enabled: true + after: '30 days' diff --git a/config/sync/ultimate_cron.job.trash_cron.yml b/config/sync/ultimate_cron.job.trash_cron.yml new file mode 100644 index 000000000..ce1fa1d3b --- /dev/null +++ b/config/sync/ultimate_cron.job.trash_cron.yml @@ -0,0 +1,17 @@ +uuid: e669d5e4-9136-4ade-8b67-12e03ee08043 +langcode: en +status: true +dependencies: + module: + - trash +title: 'Default cron handler' +id: trash_cron +weight: 0 +module: trash +callback: 'trash#cron' +scheduler: + id: simple +launcher: + id: serial +logger: + id: database