When Developing a custom module for Drupal, we need to use Drupal APIs and we need to make use of Drupal hooks. There are many Drupal hooks available and different hooks go in different files.
In this section we will learn about all those required hooks which should be written when developing a custom Drupal module.
First we will look at the hooks which are written in .install file.
I'd like to make a note here that don't mistaken the .module as the Drupal module. A Drupal module is consist of one or more .module file, one or more .info file and optionally, one or more .install file.
So, first we look at the hooks in .install file.
hook_install()
- Drupal 5.x - Table structure and other items like vocabulary and its terms to be used by the module.