public function MailhandlerParser::getMappingSources in Mailhandler 6.2
Same name and namespace in other branches
- 7.2 plugins/feeds/plugins/MailhandlerParser.class.php \MailhandlerParser::getMappingSources()
Declare the possible mapping sources that this parser produces.
Return value
An array of mapping sources, or FALSE if the sources can be defined by typing a value in a text field.
Example:
array(
'title' => t('Title'),
'created' => t('Published date'),
'url' => t('Feed item URL'),
'guid' => t('Feed item GUID'),
);
Overrides FeedsParser::getMappingSources
File
- plugins/
feeds/ plugins/ MailhandlerParser.class.php, line 112 - 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;
}