Skip to content

Repository files navigation

Drupal 8 hook OOP implementation.

Current implementation has some advantages:

  • it should be rather fast;
  • it uses caching and static;
  • priority is supported;
  • we have progress in naming convention problems;
  • we can inject services to classes that implement hooks;

Repo: https://github.com/Olexyy/hook_manager.git

If there are any thoughts, please share.

The idea is rather simple: Annotation to plugin contains list of canonical names for hooks with corresponding priority. (f.e. hook_theme => 0) We need to implement this hook as method in camel case, so this is public function hookTheme();

About

Drupal 8 hooks as plugins concept, php, Drupal 8

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages