Next Tutorial

Drupal 7 Tutorial Part 15: Drupal 7 Advanced Taxonomy Concepts

How to find which modules are implementing a hook in Drupal 7

Submitted by anilsagar on Wed, 08/10/2011 - 10:43

Many of you know, hooks are the way to extend drupal. Each and every module implement a hook to extend drupal functionality. For, debugging purpose or for any other reason if you want to know which are modules implementing a certain hook you can use below function.

<?php

$modules = module_implements($hook, $sort = FALSE, $reset = FALSE);

?>

$hook should be replaced by hook name like 'menu' or 'help'

$sort if repalced by TRUE modules are sorted by title name

$modules contains array of module names that are implementing $hook that we provided in the function.

2 comments

Drupal platform is not too

Submitted by research papers (not verified) on Wed, 01/04/2012 - 16:08.

Drupal platform is not too difficult to understand but needs to be thoroughly learnt!

Like your site and I maintain a site similar to this

Submitted by Amitav Roy (not verified) on Tue, 10/11/2011 - 22:31.

Hey my friend I really like the articles that you have posted on your site. Even I maintain a site so that I can help other learn drupal 7 and its new features Hook theme and hook node load drupal 7

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.
©2010 AnilSagar. All rights reserved. Drupal theme by Kiwi Themes.