diff options
author | Jennifer Hodgdon <yahgrp@poplarware.com> | 2013-04-10 14:37:03 -0700 |
---|---|---|
committer | Jennifer Hodgdon <yahgrp@poplarware.com> | 2013-04-10 14:37:03 -0700 |
commit | 93510d585b54846fce4ba1d9736ee31e04bda861 (patch) | |
tree | 732ceb84924eb15c9aaa4fa9fb3dc0fd611dd48b /includes | |
parent | 93029c6268a5a30414f9ef81c9ad2df7ad992613 (diff) | |
download | brdo-93510d585b54846fce4ba1d9736ee31e04bda861.tar.gz brdo-93510d585b54846fce4ba1d9736ee31e04bda861.tar.bz2 |
Issue #1250500 by dcam, joachim, jhodgdon: Add topic for callback functions
Diffstat (limited to 'includes')
-rw-r--r-- | includes/module.inc | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/includes/module.inc b/includes/module.inc index 341cd7911..769f60620 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -610,9 +610,40 @@ function module_disable($module_list, $disable_dependents = TRUE) { * just models that you can modify. Only the hooks implemented within modules * are executed when running Drupal. * - * See also @link themeable the themeable group page. @endlink + * @see themeable + * @see callbacks */ + /** + * @defgroup callbacks Callbacks + * @{ + * Callback function signatures. + * + * Drupal's API sometimes uses callback functions to allow you to define how + * some type of processing happens. A callback is a function with a defined + * signature, which you define in a module. Then you pass the function name as + * a parameter to a Drupal API function or return it as part of a hook + * implementation return value, and your function is called at an appropriate + * time. For instance, when setting up batch processing you might need to + * provide a callback function for each processing step and/or a callback for + * when processing is finished; you would do that by defining these functions + * and passing their names into the batch setup function. + * + * Callback function signatures, like hook definitions, are described by + * creating and documenting dummy functions in a *.api.php file; normally, the + * dummy callback function's name should start with "callback_", and you should + * document the parameters and return value and provide a sample function body. + * Then your API documentation can refer to this callback function in its + * documentation. A user of your API can usually name their callback function + * anything they want, although a standard name would be to replace "callback_" + * with the module name. + * + * @see hooks + * @see themeable + * + * @} End of "defgroup callbacks". + */ + /** * Determines whether a module implements a hook. * |