task: #3608369 Convert the procedural hooks to OOP hook classes in the Varbase Core module

Converts all procedural hook implementations in the Varbase Core module (varbase_core.module + varbase_core.tokens.inc) to a Drupal 11 object-oriented hook class using the #[Hook] attribute (change record), with the config factory, class resolver, request stack and theme manager injected via the constructor. Both procedural files are removed.

Related issue: #3608369

What changed

hook_form_node_form_alter, hook_form_alter, hook_template_preprocess_default_variables_alter, hook_modules_installed, hook_email_registration_name_alter, hook_token_info, hook_tokens\Drupal\varbase_core\Hook\VarbaseCoreHooks. Removed varbase_core.module and varbase_core.tokens.inc.

Checkpoints

  • All hooks converted to an OOP #[Hook] class with dependency injection
  • .module and .tokens.inc removed
  • Coding standards pass
  • Reviewed and approved

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.

Merge request reports

Loading