You are here

public function MailhandlerParser::sourceForm in Mailhandler 7.2

Same name and namespace in other branches
  1. 6.2 plugins/feeds/plugins/MailhandlerParser.class.php \MailhandlerParser::sourceForm()

Implements sourceForm().

File

plugins/feeds/plugins/MailhandlerParser.class.php, line 37
MailhandlerParser class.

Class

MailhandlerParser
Parses an IMAP stream.

Code

public function sourceForm($source_config) {
  $form['auth_required'] = array(
    '#type' => 'checkbox',
    '#title' => t('Skip messages that fail authentication'),
    '#default_value' => isset($source_config['auth_required']) ? $source_config['auth_required'] : '',
    '#description' => t('If checked, only messages that belong to an authenticated user will be imported.'),
  );
  $plugins = mailhandler_get_plugins('mailhandler', 'commands');
  foreach ($plugins as $plugin_name => $plugin) {
    if ($class = mailhandler_plugin_load_class('mailhandler', $plugin_name, 'commands', 'handler')) {
      $class
        ->sourceForm($form, $source_config);
    }
  }
  return $form;
}