function MailhandlerCommandsDefault::getMappingSources in Mailhandler 6.2
Same name and namespace in other branches
- 7.2 plugins/mailhandler/commands/MailhandlerCommandsDefault.class.php \MailhandlerCommandsDefault::getMappingSources()
Implements getMappingSources().
Overrides MailhandlerCommands::getMappingSources
File
- plugins/
mailhandler/ commands/ MailhandlerCommandsDefault.class.php, line 94 - MailhandlerCommandsDefault class.
Class
- MailhandlerCommandsDefault
- @file MailhandlerCommandsDefault class.
Code
function getMappingSources($config) {
$sources = array();
$sources['body_text'] = array(
'name' => t('Body (Text)'),
'description' => t('Plain-text message body. Will fall back to HTML body if necessary.'),
);
$sources['body_html'] = array(
'name' => t('Body (HTML)'),
'description' => t('HTML message body. Will fall back to text body if necessary.'),
);
$available_commands = explode("\n", $config['available_commands']);
foreach ($available_commands as $command) {
$command = trim($command);
$sources[$command] = array(
'name' => $command,
'description' => $command . ' (commanded)',
);
}
return $sources;
}