Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291082

Add a ModuleHandler method to invoke hooks and pass args by reference, but without appending _alter

$
0
0

#1871596: Create a PartialResponse class to encapsulate html-level data and some other issues I can't find at the moment point out that we have lots of hooks that aren't suffixed with _alter(), that otherwise are functionally identicatal to an alter hook (they get an argument passed by reference is more or less it).

At the moment the only way to execute those hooks is to loop over the hook implementations and call the hook with $function, which leads to a lot of code repetition and also means you can't easily trace back function calls to the extension manager.

While we might want to revisit why these hooks aren't alters in the first place in many cases, we could also just add a new method to the extension manager that does the same as drupal_alter() without messing around with the hook name.


Viewing all articles
Browse latest Browse all 291082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>