You are here

function messaging_message_group in Messaging 5

Same name and namespace in other branches
  1. 6 messaging.module \messaging_message_group()
  2. 6.2 messaging.module \messaging_message_group()
  3. 6.3 messaging.module \messaging_message_group()

Returns information about message groups

Parameters

$group: Optional message group. Returns all groups if null.

$key: Optional message key inside the group. Returns all keys if null.

Return value

array() Depending on parameters, may be all message groups and keys or only a specific one.

1 call to messaging_message_group()
messaging_help in ./messaging.module
Implementation of hook_help().

File

./messaging.module, line 723

Code

function messaging_message_group($group = NULL, $key = NULL) {
  static $info;
  if (!isset($info)) {
    $info = module_invoke_all('messaging', 'message groups');
  }
  if ($key) {
    return isset($info[$group][$key]) ? $info[$group][$key] : NULL;
  }
  elseif ($group) {
    return isset($info[$group]) ? $info[$group] : array();
  }
  else {
    return $info;
  }
}