View source
<?php
function views_charts_views_api() {
return array(
'api' => 2,
);
}
function views_charts_init() {
$mpath = drupal_get_path('module', 'views_charts');
drupal_add_js($mpath . '/views_charts.js', 'module', 'header', FALSE, TRUE, FALSE);
drupal_add_css($mpath . '/views_charts.css');
}
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;
}