function nagios_invoke_all in Nagios Monitoring 7
Same name and namespace in other branches
- 8 nagios.module \nagios_invoke_all()
- 5 nagios.module \nagios_invoke_all()
- 6 nagios.module \nagios_invoke_all()
Custom invoke function
2 calls to nagios_invoke_all()
- nagios_settings in ./
nagios.module - Callback for the settings page
- nagios_status_page in ./
nagios.module - Callback for the nagios status page
File
- ./
nagios.module, line 406
Code
function nagios_invoke_all($hook = 'nagios') {
// This is a custom invoke function that returns a keyed array
$return = [];
foreach (module_implements($hook) as $module) {
// if we're running the checks, see if the checks for that module
// are enabled, otherwise just continue
if ($hook == 'nagios' && !variable_get('nagios_enable_' . $module, 0)) {
continue;
}
/** @var callable $function */
$function = $module . '_' . $hook;
$result = $function();
$return[$module] = $result;
}
return $return;
}