function messaging_method_info in Messaging 7
Same name and namespace in other branches
- 5 messaging.module \messaging_method_info()
- 6.4 messaging.module \messaging_method_info()
- 6 messaging.module \messaging_method_info()
- 6.2 messaging.module \messaging_method_info()
- 6.3 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
17 calls to messaging_method_info()
- messaging_admin_method_filters in ./
messaging.admin.inc - Settings for filter and formatting for each sending method
- messaging_admin_method_settings in ./
messaging.admin.inc - Default sending methods settings
- messaging_admin_settings in ./
messaging.admin.inc - Admin settings form
- messaging_admin_test_post_form in ./
messaging.admin.inc - Incoming message form
- Messaging_Destination::create_method in ./
messaging.destination.inc - Create for sending method
File
- ./
messaging.module, line 417
Code
function messaging_method_info($method = NULL, $property = NULL, $default = NULL) {
static $info;
if (!isset($info)) {
// Collect method info without 'alter', we do it later
$info =& messaging_info('send methods', NULL, FALSE, FALSE);
// Get list of enabled methods. All will be enabled by default.
$enabled = variable_get('messaging_method_enabled', array());
// Merge settings from variable for each enabled method
foreach (array_keys($info) as $name) {
$info[$name] = array_merge($info[$name], variable_get('messaging_method_' . $name, array()), variable_get('messaging_filters_' . $name, array()));
// If not set enabled flag, the method will be enabled by default
$info[$name]['enabled'] = isset($enabled[$name]) ? $enabled[$name] : TRUE;
}
// Allow altering by other modules after we've set the variables
drupal_alter('messaging_send_methods', $info);
}
return messaging_array_info($info, $method, $property, $default);
}