diff options
author | Jennifer Hodgdon <yahgrp@poplarware.com> | 2013-04-24 08:42:41 -0700 |
---|---|---|
committer | Jennifer Hodgdon <yahgrp@poplarware.com> | 2013-04-24 08:42:41 -0700 |
commit | 4ebf3891601623c42a61108ce675e79cd35f0f7f (patch) | |
tree | 1352d6adde3a94246b4f38edfef8a6e575132ae1 /includes | |
parent | 5cf0a35963ec6cc66a6248b0c4768696a2bbd277 (diff) | |
download | brdo-4ebf3891601623c42a61108ce675e79cd35f0f7f.tar.gz brdo-4ebf3891601623c42a61108ce675e79cd35f0f7f.tar.bz2 |
Issue #1936166 by markpavlitski: Add information on passing args by reference to module_invoke functions doc
Diffstat (limited to 'includes')
-rw-r--r-- | includes/module.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/module.inc b/includes/module.inc index 769f60620..9b5944b87 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -846,6 +846,9 @@ function module_implements_write_cache() { /** * Invokes a hook in a particular module. * + * All arguments are passed by value. Use drupal_alter() if you need to pass + * arguments by reference. + * * @param $module * The name of the module (without the .module extension). * @param $hook @@ -855,6 +858,8 @@ function module_implements_write_cache() { * * @return * The return value of the hook implementation. + * + * @see drupal_alter() */ function module_invoke($module, $hook) { $args = func_get_args(); @@ -868,6 +873,9 @@ function module_invoke($module, $hook) { /** * Invokes a hook in all enabled modules that implement it. * + * All arguments are passed by value. Use drupal_alter() if you need to pass + * arguments by reference. + * * @param $hook * The name of the hook to invoke. * @param ... @@ -876,6 +884,8 @@ function module_invoke($module, $hook) { * @return * An array of return values of the hook implementations. If modules return * arrays from their implementations, those are merged into one array. + * + * @see drupal_alter() */ function module_invoke_all($hook) { $args = func_get_args(); |