Problem/Motivation
The orphan cleanup functionality currently relies on configuration values that cannot be managed through the Drupal administrative interface.
Site administrators should be able to configure orphan cleanup behavior without manually editing configuration files or using Drush commands.
Steps to reproduce
- Enable the Block Content Explorer module
- Attempt to configure orphan cleanup settings from the Drupal admin UI
- Observe that there is no settings form for managing cleanup configuration
Proposed resolution
- Create
src/Form/SettingsForm.php - Extend
ConfigFormBase - Add configuration form route for:
admin/config/content/block-explorer/settings
- Add form fields for:
- Enable automatic cleanup
- Cleanup interval (days)
- Maximum blocks processed per cron run
- Use Drupal
#statesto hide cleanup fields when auto-cleanup is disabled - Save configuration values to
block_content_explorer.settings
Remaining tasks
- Create settings form class
- Add configuration form route
- Add menu link for admin configuration page
- Implement form validation and submission handling
- Add conditional field visibility using
#states - Test configuration save functionality
User interface changes
Adds a new admin configuration page:
admin/config/content/block-explorer/settings
The page provides configurable orphan cleanup settings for site administrators.
API changes
None.
Data model changes
None.
Issue fork block_content_explorer-3589437
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
oshi02 commentedComment #5
oshi02 commentedComment #9
mohnish s. yadav