task: #3608328 Convert the procedural hooks to OOP hook classes in the Vartheme BS5 theme
Converts the convertible procedural hook implementations in the Vartheme BS5 theme to a Drupal 11 object-oriented hook class using the #[Hook] attribute (change record), with the theme extension list provided through constructor dependency injection. Preprocess hooks and the vartheme_bs5_process_menu_level() helper stay procedural in the .theme file.
Related issue: #3608328
What changed
hook_theme, hook_library_info_alter, hook_form_alter → \Drupal\vartheme_bs5\Hook\VarthemeBs5Hooks.
This changeset was produced with AI assistance (Claude Code). Per the Drupal AI-generated contribution policy, it has been reviewed by a human before submission.
Checkpoints
- File an issue about this project
- Addition/Change/Update/Fix to this project
- Testing to ensure no regression
- Automated unit/functional testing coverage
- Developer Documentation support on feature change/addition
- User Guide Documentation support on feature change/addition
- UX/UI designer responsibilities
- Accessibility and Readability
- Reviewed by a human
- Code review by maintainers
- Full testing and approval
- Credit contributors
- Review with the product owner
- Update Release Notes
- Release
Edited by Rajab Natshah