You are here

function messaging_message_info in Messaging 5

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

Returns parts of messages, that may be formatted for each sending method

Parameters

$group: Message group.

$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_info()
messaging_message_part in ./messaging.module
Returns parts of messages, that may be formatted for each sending method

File

./messaging.module, line 699

Code

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