You are here

function charts_graphs_init in Charts and Graphs 7.2

Same name and namespace in other branches
  1. 6.2 charts_graphs.module \charts_graphs_init()
  2. 6 charts_graphs.module \charts_graphs_init()
  3. 7 charts_graphs.module \charts_graphs_init()

Implements hook_init().

File

./charts_graphs.module, line 11

Code

function charts_graphs_init() {
  require_once drupal_get_path('module', 'charts_graphs') . '/charts_graphs_canvas.class.inc';
  $api_providers = array();
  $hook = 'chartgraph_provider';
  foreach (module_implements($hook) as $module) {
    $function = $module . '_' . $hook;
    $result = call_user_func_array($function, array());
    if (!empty($result) && is_object($result)) {
      $result->modulename = $module;

      //save it as a provider;
      charts_graphs_apis($result);
    }
  }
}