You are here

public function MailhandlerCommandsDefault::sourceForm in Mailhandler 7.2

Same name and namespace in other branches
  1. 6.2 plugins/mailhandler/commands/MailhandlerCommandsDefault.class.php \MailhandlerCommandsDefault::sourceForm()

Build source form.

Overrides MailhandlerCommands::sourceForm

File

plugins/mailhandler/commands/MailhandlerCommandsDefault.class.php, line 78
MailhandlerCommandsDefault class.

Class

MailhandlerCommandsDefault
Provides default commands.

Code

public function sourceForm(&$form, $source_config) {
  $form['default_commands'] = array(
    '#type' => 'textarea',
    '#title' => t('Default commands (authenticated users)'),
    '#description' => t('A set of commands that are added to each message by default, if the user is authenticated. Should be in the form "key: value".'),
    '#default_value' => isset($source_config['default_commands']) ? $source_config['default_commands'] : '',
  );
  $form['commands_failed_auth'] = array(
    '#type' => 'textarea',
    '#title' => t('Default commands (anonymous users)'),
    '#description' => t('A set of commands that are added to each message by default, if the user is not authenticated. Should be in the form "key: value".'),
    '#default_value' => isset($source_config['commands_failed_auth']) ? $source_config['commands_failed_auth'] : '',
  );
}