You are here

function forena_check_all_access in Forena Reports 7.3

Same name and namespace in other branches
  1. 8 forena.module \forena_check_all_access()
  2. 7.5 forena.module \forena_check_all_access()
  3. 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.:

1 string reference to 'forena_check_all_access'
FrxMenu::addMenuItems in ./FrxMenu.inc
Add menu items to the items array

File

./forena.module, line 885

Code

function forena_check_all_access($checks) {

  // Check each callback function to see if we have an error.
  $access = FALSE;
  if ($checks) {
    foreach ((array) $checks as $callback => $args) {
      if ($callback && $args) {
        foreach ($args as $arg) {
          if (function_exists($callback)) {
            $a = $callback($arg);
          }
          if ($a) {
            $access = TRUE;
          }
        }
      }
      else {
        $access = TRUE;
      }
    }
  }
  return $access;
}