You are here

function forena_define_plugins in Forena Reports 6

Same name and namespace in other branches
  1. 7 forena.common.inc \forena_define_plugins()

Loads all of the include files that

1 call to forena_define_plugins()
__forena_load_provider in ./forena.common.inc
Load the data provider class based on the class name.

File

./forena.common.inc, line 540
Common functions used throughout the project but loaded in this file to keep the module file lean.

Code

function forena_define_plugins($class = '') {
  $plugins = forena_plugins();
  foreach ($plugins as $p) {
    if ($class == '' || $class == $p['class']) {
      if ($p['file'] && $p['module']) {
        include_once drupal_get_path('module', $p['module']) . '/' . trim($p['file'], '/');
      }
    }
  }
}