- Issue created by @johnv
Change-record Support for object oriented hook implementations using autowired services → describes how to create a Hook class.
Change-record
Improve performance by preventing unnecessary scanning of procedural hooks →
says:
"Drupal 11.1 enables the use of OOP hooks, which are the future of hooks in Drupal. A backwards-compatibility layer is provided for legacy procedural hooks. "
It describes a new parameter: module_name.hooks_converted: true
Change-record Most procedural hook implementations have been converted to a hook class → describes the changes in core itself.
Introduce hook classes.
- create Hook class for hook_theme and hook_preprocess hook implementations.
- create Hook class for hook_views and hook_field_views hook implementations.
- .. for hook_office_hours
- .. for hook_tokens
- .. for hook_field_type_category
- .. for hook_cron (?)
- When all is done, introduce parameters: module_name.hooks_converted: true
Active
1.0
Code