You are here

public function MailhandlerParser::getMappingSources in Mailhandler 7.2

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

This defines sources which user's can select to map values to.

File

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

Class

MailhandlerParser
Parses an IMAP stream.

Code

public function getMappingSources() {
  $sources = parent::getMappingSources();
  $sources['authenticated_uid'] = array(
    'name' => t('User ID'),
    'description' => t('The authenticated Drupal user ID'),
  );
  $plugins = mailhandler_get_plugins('mailhandler', 'commands');
  foreach ($plugins as $plugin_name => $plugin) {
    $plugin = mailhandler_plugin_load_class('mailhandler', $plugin_name, 'commands', 'handler');
    $sources = array_merge($sources, $plugin
      ->getMappingSources($this->config));
  }
  return $sources;
}