You are here

function ChartsGraphsBluff::get_bluff_js_files in Charts and Graphs 6.2

Same name and namespace in other branches
  1. 7 apis/charts_graphs_bluff/charts_graphs_bluff.class.inc \ChartsGraphsBluff::get_bluff_js_files()

Cache list of javascript files for performance.

1 call to ChartsGraphsBluff::get_bluff_js_files()
ChartsGraphsBluff::get_chart in apis/charts_graphs_bluff/charts_graphs_bluff.class.inc
Function that renders data.

File

apis/charts_graphs_bluff/charts_graphs_bluff.class.inc, line 287
Implementation of abstract class ChartsGraphsCanvas for Bluff library.

Class

ChartsGraphsBluff
Implementation of abstract class ChartsGraphsCanvas for Bluff library.

Code

function get_bluff_js_files() {
  static $js_files = NULL;
  if (is_array($js_files)) {
    return $js_files;
  }
  $bluff_path = drupal_get_path('module', 'charts_graphs_bluff');
  $bluff_files = array_map('basename', glob(dirname(__FILE__) . '/bluff/*.js'));
  rsort($bluff_files);
  $js_files = array();
  foreach ($bluff_files as $bluff_file) {
    $file_path = sprintf('%s/bluff/%s', $bluff_path, $bluff_file);
    $js_files[] = $file_path;
  }
  return $js_files;
}