You are here

function ChartsBluff::get_bluff_js_files in Charts and Graphs 6

Cache list of javascript files for performance.

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

File

apis/charts_bluff/charts_bluff.class.inc, line 205
Implementation of abstract class ChartCanvas for Bluff library.

Class

ChartsBluff
Implementation of abstract class ChartCanvas 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_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;
}