Reputation: 5479
the drupal is 6. 1, in drupal.everything's output is by a theme function or a template file.is this right. if right,then question 2.
2,in a module there is a hook_link and hook_menu, how they output? i can't find a theme function or a template file effect it. thank you.
eg:in book's module there is a book_link() defined. but i can't find there is a heme_book_link(),and in hook_theme there is no return of the book_link.
Upvotes: 0
Views: 227
Reputation: 1831
3 things that make understanding Drupal hooks:
For Example: If module foo has a hook_dosomething() there is a function in foo.module that implements module_invoke_all('foo', 'dosomething')
The other way to think about it is that the hook "exteneds" a function someplace else, and anything that happens in the hook happens in the function that calls module_invoke_all() in it.
Upvotes: 1
Reputation: 8289
Not all hooks generate output. hook_menu() and hook_link(), for example, just return arrays with data that will be used by Drupal in some way (e.g. to register new paths in the system).
Upvotes: 1