Hooks, also called callbacks, can be described as internal Drupal events. Hooks essentially allow Drupal modules to hook into the rest of the Drupal installation.
The first function in the code below describes the form to drupal. The only form defined is a text field. The text field will be used so that the admin can designate the number of beeps.
The following snippet demonstrates how to create a module in Drupal 7. It will send a message to the log every time new content is created.
Save block-specific configuration settings. Configuration settings are defined in hook_block_configure().
Hook_block_view() takes in $delta as a parameter. $delta is the unique identifier for the block within the module. $delta is defined in hook_block_info(). It returns an array containing "subject" and "content".
hook_block_info() declares to Drupal what blocks are provided by the module. Initial block configs can be specified. Each block provided by the module is given a unique identifier. The unique identifier is referred to as $delta.
hook_block_configure() takes in $delta as a parameter. $delta is the unique identifier for the block to be configured. The unique identify is defined in hook_block_info(). It returns a configuration form.
This hook declares admin settings for module. It provides admin interface for controlling settings for module. A menu item for module will appear in admin menu when the hook is implemented. It returns an array containing form items.
hook_menu() registers paths to define how url requests are handled. It returns an associative array. Its keys define paths. Its values are an associative array of properties for each path.