You are here

function forena_plugins in Forena Reports 7

Same name and namespace in other branches
  1. 6 forena.common.inc \forena_plugins()

Invokes the hooks required for forena plugin registration. Each module returns an array structure that defines multiple plugins

class - Indicates the name of the class that will be used to define the plugins behaviors.

1 call to forena_plugins()
forena_define_plugins in ./forena.common.inc
Loads all of the include files that

File

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

Code

function forena_plugins() {
  static $plugins = '';
  if (!$plugins) {
    $plugins = array();
    foreach (module_list() as $module) {
      $function = $module . '_forena_plugins';
      if (function_exists($function)) {
        $returned_plugins = $function();
        if ($returned_plugins) {
          foreach ((array) $returned_plugins as $p) {
            $p['module'] = $module;
            $plugins[] = $p;
          }
        }
      }
    }
  }
  return $plugins;
}