You are here

function views_charts_invoke_all in Views Charts 7

Same name and namespace in other branches
  1. 6 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 30

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);
    }
    elseif (isset($result)) {
      $return[] = $result;
    }
  }
  return $return;
}