You are here

function views_charts_invoke_all in Views Charts 6

Same name and namespace in other branches
  1. 7 views_charts.module \views_charts_invoke_all()

module_invoke_all() substitute that works with referenced parameters.

Parameters

string $hook:

array $args:

Return value

array

1 call to views_charts_invoke_all()
views_plugin_style_chart::_render in ./views_plugin_style_chart.inc

File

./views_charts.module, line 22

Code

function views_charts_invoke_all($hook, $args) {
  $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 = array_merge_recursive($return, $result);
    }
    else {
      if (isset($result)) {
        $return[] = $result;
      }
    }
  }
  return $return;
}