You are here

function _messaging_callback_get in Messaging 6.3

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

Get a callback from the information array if present

Parameters

$info: Information array, typically a messaging method info array

$type: Callback type, the search key will be '[type] callback'

$default: Default callback to return if not in the $info array

2 calls to _messaging_callback_get()
messaging_message_callbacks in ./messaging.module
Invoke ordered list of callbacks on message
Messaging_Methods_Tests::testMessagingMethods in tests/messaging_methods.test
Test message sending callbacks for enabled plug-ins

File

./messaging.module, line 909

Code

function _messaging_callback_get($info, $type, $default = NULL) {
  if (!empty($info[$type . ' callback'])) {
    return $info[$type . ' callback'];
  }
  else {
    return $default;
  }
}