- Issue created by @rodrigoaguilera
Having, for example, a twig in the active theme views-view--product-listing--page-1.html.twig that corresponds with the theme function views_view__product_listing__page_1 makes the module not to dispatch any event since the hook name is not recognized by the factory.
Reading the docs doesn't help figuring out the correct way
Override a view with a template and make an event subscriber for views.
When processing the hook name for a preprocess take only the part before "__" if there is one. This makes views_view__product_listing__page_1 into views_view, which is correctly handled. The original name will always be in the variables under "theme_hook_original".
Code. I don't mind writing it and adding tests if the proposal is accepted
All HOOK_NAME__FOOBAR theme hooks will start firing events for HOOK_NAME
Active
4.1
Code