function _charts_module_invoke_all in Charts 7
Same name and namespace in other branches
- 6 charts.admin.inc \_charts_module_invoke_all()
Invoke a hook in all enabled modules that implement it.
Its copy of module_invoke_all()
See also
File
- ./
charts.admin.inc, line 106 - @author Bruno Massa http://drupal.org/user/67164
Code
function _charts_module_invoke_all() {
$args = func_get_args();
$hook = $args[0];
unset($args[0]);
$return = array();
foreach (module_implements($hook) as $module) {
$function = $module . '_' . $hook;
$result = call_user_func_array($function, $args);
if (isset($result) && is_array($result)) {
$return += $result;
}
elseif (isset($result)) {
$return[] = $result;
}
}
return $return;
}