function FrxDrupalApplication::controls in Forena Reports 7.2
Same name and namespace in other branches
- 6.2 FrxDrupalApplication.inc \FrxDrupalApplication::controls()
- 7.3 FrxDrupalApplication.inc \FrxDrupalApplication::controls()
- 7.4 FrxDrupalApplication.inc \FrxDrupalApplication::controls()
Builds a global array of available controls and returns the array.
Overrides FrxHostApplication::controls
File
- ./
FrxDrupalApplication.inc, line 225 - HostApp.inc Defines all the interface points between the host application and Forena. Each of these methods must be specified in order for Forena to function properly. The base class here is drupal, so those
Class
Code
function controls() {
static $controls = '';
if (!$controls) {
$controls = array();
foreach (module_list() as $module) {
$function = $module . '_forena_controls';
if (function_exists($function)) {
$returned_controls = $function();
if ($returned_controls) {
foreach ((array) $returned_controls as $c) {
$c['module'] = $module;
$c['file'] = drupal_get_path('module', $c['module']) . '/' . trim($c['file'], '/');
$controls[] = $c;
}
}
}
}
}
return $controls;
}