function forena_check_all_access in Forena Reports 8
Same name and namespace in other branches
- 7.5 forena.module \forena_check_all_access()
- 7.3 forena.module \forena_check_all_access()
- 7.4 forena.module \forena_check_all_access()
Used in hook_menu to test access to menu items.
Parameters
$checks array key value of callbacks and args to check.:
Return value
bool FALSE implies access should be denied.
1 call to forena_check_all_access()
- ReportEditor::load in src/
Editor/ ReportEditor.php - Load report from file system
1 string reference to 'forena_check_all_access'
- Menu::addMenuItems in src/
Menu.php - Add menu items to the items array
File
- ./
forena.module, line 232
Code
function forena_check_all_access($checks) {
// Check each callback function to see if we have an error.
$access = FALSE;
// Check each callback function to see if we have an error.
if ($checks) {
foreach ($checks as $provider => $callbacks) {
foreach ($callbacks as $callback => $args) {
if ($callback) {
foreach ($args as $arg) {
if (function_exists($callback) && $arg) {
$a = $callback($arg);
if ($a) {
$access = TRUE;
}
}
else {
$access = TRUE;
}
}
}
else {
$access = TRUE;
}
}
}
}
return $access;
}