You are here

public function MailhandlerFetcher::sourceForm in Mailhandler 6.2

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

Source form.

Overrides FeedsPlugin::sourceForm

File

plugins/feeds/plugins/MailhandlerFetcher.class.php, line 50
Checks for new messages in a mailbox (IMAP, POP3, etc...).

Class

MailhandlerFetcher

Code

public function sourceForm($source_config) {
  include_once drupal_get_path('module', 'mailhandler') . '/mailhandler.module';
  $form = array();
  $form['source'] = array(
    '#type' => 'select',
    '#title' => t('Mailbox'),
    '#description' => t('Select a mailbox to use'),
    '#default_value' => isset($source_config['source']) ? $source_config['source'] : '',
    '#options' => _mailhandler_build_options(mailhandler_mailbox_load_all(FALSE), 'admin_title'),
  );
  return $form;
}