task: #3608326 Convert the procedural hooks to OOP hook classes in the Varbase API module
Converts the procedural hook implementations in the Varbase API module to Drupal 11 object-oriented hook classes using the #[Hook] attribute (change record), with the required services provided through constructor dependency injection. The .module file is reduced to non-hook code only.
Related issue: #3608326
What changed
hook_entity_insert, hook_ENTITY_TYPE_presave (view), hook_entity_operation, hook_form_oauth2_token_settings_alter, hook_entity_bundle_create → \Drupal\varbase_api\Hook\VarbaseApiHooks (config factory, route builder/provider, config installer, current user, JSON:API resource-type repository, logger factory injected). Three non-hook helpers kept procedural.
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