You are here

function charts_graphs_apis in Charts and Graphs 7.2

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

Return the list of graphing implementations available if no parameter is passed or add a new implementation to the static list.

@staticvar <array> $apis

Parameters

<ChartsGraphsCanvas> $api_class:

Return value

<string>

4 calls to charts_graphs_apis()
charts_graphs_get_graph in ./charts_graphs.module
Factory method that allows instantiating of a charting implementation class by implementation name.
charts_graphs_init in ./charts_graphs.module
Implements hook_init().
charts_graphs_requirements in ./charts_graphs.install
Implements hook_requirements().
charts_graphs_test in ./charts_graphs.module
For testing and Advanced Help examples.

File

./charts_graphs.module, line 184

Code

function charts_graphs_apis($api_class = NULL) {
  static $apis = array();
  if (!empty($api_class)) {
    $apis[$api_class->name] = $api_class;
  }
  else {
    return $apis;
  }
}