Use this Drush snippet to print out a list of all of the implementations of a hook in your Drupal site.
This will print out all of the "hook_cron" hooks using the property of "cron" in the getImplementations() method of the Drupal module handler.
drush php-eval 'foreach (\Drupal::moduleHandler()->getImplementations("cron") as $value){echo "$value\n";}'
This will print out something like the following (depending on what modules you have installed).
comment
dblog
field
file
node
system
update
You can do the same with any hook on your site, hook_form_alter() for example.
drush php-eval 'foreach (\Drupal::moduleHandler()->getImplementations("form_alter") as $value){echo "$value\n";}'
Add new comment