diff --git a/boulder_profile.install b/boulder_profile.install index 802b7d8..2ea70b7 100644 --- a/boulder_profile.install +++ b/boulder_profile.install @@ -22,6 +22,7 @@ function boulder_profile_install() { _boulder_profile_install_shortcuts(); _boulder_profile_install_administerusersbyrole_settings(); _boulder_profile_install_webform_settings(); + _boulder_profile_install_trash_settings(); } /** @@ -196,3 +197,13 @@ function _boulder_profile_install_webform_settings() { $htmlEditorSettings['element_format'] = $htmlEditorSettings['mail_format'] = 'wysiwyg'; $settings->set('html_editor', $htmlEditorSettings)->save(); } + +/** + * Installs Trash contrib module settings. + */ +function _boulder_profile_install_trash_settings() { + $profilePath = Drupal::getContainer()->get('extension.path.resolver')->getPath('profile', 'boulder_profile'); + $settingsYaml = Yaml::parse(file_get_contents($profilePath . '/config/install/trash.settings.yml')); + $settingsYaml['enabled_entity_types'] = ['node' => []]; + \Drupal::configFactory()->getEditable('trash.settings')->setData($settingsYaml)->save(); +} diff --git a/config/install/trash.settings.yml b/config/install/trash.settings.yml index 4dc4a31..4bce18c 100644 --- a/config/install/trash.settings.yml +++ b/config/install/trash.settings.yml @@ -1,5 +1,5 @@ enabled_entity_types: { } auto_purge: - enabled: false - after: '30 days' + enabled: true + after: '14 days' compact_overview: false