You are here

function messaging_method_info in Messaging 6

Same name and namespace in other branches
  1. 5 messaging.module \messaging_method_info()
  2. 6.4 messaging.module \messaging_method_info()
  3. 6.2 messaging.module \messaging_method_info()
  4. 6.3 messaging.module \messaging_method_info()
  5. 7 messaging.module \messaging_method_info()

Returns messaging methods properties

Parameters

$method: Optional, Method to get properties for, none or NULL for all methods

$property: Optional, Property to get, none or NULL for all properties

$default: Optional default value to return when there's not that property for the method

22 calls to messaging_method_info()
messaging_admin_method_settings in ./messaging.admin.inc
Default sending methods settings
messaging_admin_template in ./messaging.admin.inc
Messaging_API_Tests::testMessagingSendingAPI in tests/messaging_api.test
Play with creating, retrieving, deleting a pair messages
messaging_message_send in ./messaging.module
Send message to array of destinations. The message is rendered just once.
messaging_message_send_out in ./messaging.module
Send for real, finally invoking method's callback function

... See full list

File

./messaging.module, line 607

Code

function messaging_method_info($method = NULL, $property = NULL, $default = NULL, $refresh = FALSE) {
  static $info, $properties;
  if (!$info || $refresh) {
    $info = module_invoke_all('messaging', 'send methods');

    // Merge settings for each enabled method
    foreach (array_keys($info) as $name) {
      $info[$name] = array_merge($info[$name], variable_get('messaging_method_' . $name, array()));
    }

    // Allow altering by other modules
    drupal_alter('messaging_methods', $info);
  }
  return _messaging_info($info, $method, $property, $default);
}