You are here

function notifications_callback in Notifications 6.4

Same name and namespace in other branches
  1. 5 notifications.module \notifications_callback()
  2. 6 notifications.module \notifications_callback()
  3. 6.2 notifications.module \notifications_callback()
  4. 6.3 notifications.module \notifications_callback()

Callback for module dependent data

Some data stored in the notifications system is meant to be processed by other modules and this is indicated by a module column in the data.

This function calls the module function if available, defaulting to the notifications provided function when not. The arguments are passed as is

Parameters

$module: Module name

$function: Function name in module

File

./notifications.module, line 2031
Notifications module

Code

function notifications_callback() {
  $args = func_get_args();
  $module = array_shift($args);
  $function = array_shift($args);
  if ($module && function_exists($module . '_notifications_' . $function)) {
    $callback = $module . '_notifications_' . $function;
  }
  else {
    $callback = 'notifications_' . $function;
  }
  return call_user_func_array($callback, $args);
}