| 1 |
<?php |
<?php |
| 2 |
// $Id: module.inc,v 1.115.2.1 2009/02/16 10:32:10 goba Exp $ |
// $Id: module.inc,v 1.115.2.2 2009/10/06 11:56:59 goba Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 368 |
* Allow modules to interact with the Drupal core. |
* Allow modules to interact with the Drupal core. |
| 369 |
* |
* |
| 370 |
* Drupal's module system is based on the concept of "hooks". A hook is a PHP |
* Drupal's module system is based on the concept of "hooks". A hook is a PHP |
| 371 |
* function that is named foo_bar(), where "foo" is the name of the module (whose |
* function that is named foo_bar(), where "foo" is the name of the module |
| 372 |
* filename is thus foo.module) and "bar" is the name of the hook. Each hook has |
* (whose filename is thus foo.module) and "bar" is the name of the hook. Each |
| 373 |
* a defined set of parameters and a specified result type. |
* hook has a defined set of parameters and a specified result type. |
| 374 |
* |
* |
| 375 |
* To extend Drupal, a module need simply implement a hook. When Drupal wishes to |
* To extend Drupal, a module need simply implement a hook. When Drupal wishes |
| 376 |
* allow intervention from modules, it determines which modules implement a hook |
* to allow intervention from modules, it determines which modules implement a |
| 377 |
* and call that hook in all enabled modules that implement it. |
* hook and calls that hook in all enabled modules that implement it. |
| 378 |
* |
* |
| 379 |
* The available hooks to implement are explained here in the Hooks section of |
* The available hooks to implement are explained here in the Hooks section of |
| 380 |
* the developer documentation. The string "hook" is used as a placeholder for |
* the developer documentation. The string "hook" is used as a placeholder for |
| 381 |
* the module name is the hook definitions. For example, if the module file is |
* the module name in the hook definitions. For example, if the module file is |
| 382 |
* called example.module, then hook_help() as implemented by that module would be |
* called example.module, then hook_help() as implemented by that module would |
| 383 |
* defined as example_help(). |
* be defined as example_help(). |
| 384 |
*/ |
*/ |
| 385 |
|
|
| 386 |
/** |
/** |