function messaging_admin_method_settings in Messaging 6.4
Same name and namespace in other branches
- 6 messaging.admin.inc \messaging_admin_method_settings()
- 6.2 messaging.admin.inc \messaging_admin_method_settings()
- 6.3 messaging.admin.inc \messaging_admin_method_settings()
- 7 messaging.admin.inc \messaging_admin_method_settings()
Default sending methods settings
1 string reference to 'messaging_admin_method_settings'
- messaging_menu in ./
messaging.module - Implementation of hook_menu()
File
- ./
messaging.admin.inc, line 71 - Messaging Framework - Admin UI
Code
function messaging_admin_method_settings() {
// Sending methods settings
if ($info = messaging_method_info()) {
$form['methods'] = array(
'#theme' => 'messaging_admin_settings_table',
);
foreach ($info as $method => $options) {
$options += array(
'log' => 0,
'queue' => 0,
);
$key = 'messaging_method_' . $method;
// This will preserve settings for disabled modules
$form['methods'][$key]['#tree'] = TRUE;
$form['methods'][$key]['title'] = array(
'#title' => t('Method'),
'#value' => $options['title'],
);
// Display name
$form['methods'][$key]['name'] = array(
'#title' => t('Name'),
'#type' => 'textfield',
'#default_value' => $options['name'],
'#size' => 20,
);
// Log and queue can be enabled by 'Messaging Tool', disabled otherwise
$form['methods'][$key]['queue'] = array(
'#type' => 'value',
'#value' => 0,
);
$form['methods'][$key]['log'] = array(
'#type' => 'value',
'#value' => 0,
);
}
}
else {
$form['warning'] = array(
'#value' => t('You should enable some messaging method plug-ins for this to work.'),
);
}
$form = system_settings_form($form);
// Refresh strings after update if translation enabled
if (module_exists('i18nstrings')) {
$form['#submit'][] = 'messaging_locale_refresh';
}
return $form;
}