You are here

function mailhandler_get_plugins in Mailhandler 6.2

Same name and namespace in other branches
  1. 7.2 mailhandler.module \mailhandler_get_plugins()

Wrapper to load plugins.

Parameters

$type: String - type of mailhandler plugins to retrieve.

7 calls to mailhandler_get_plugins()
MailhandlerFetcher::configForm in plugins/feeds/plugins/MailhandlerFetcher.class.php
Config form.
MailhandlerParser::commands in plugins/feeds/plugins/MailhandlerParser.class.php
MailhandlerParser::configForm in plugins/feeds/plugins/MailhandlerParser.class.php
Build configuration form.
MailhandlerParser::getMappingSources in plugins/feeds/plugins/MailhandlerParser.class.php
Declare the possible mapping sources that this parser produces.
MailhandlerParser::sourceForm in plugins/feeds/plugins/MailhandlerParser.class.php
Callback methods, exposes source form.

... See full list

File

./mailhandler.module, line 151
Retrieves email for posting as nodes and comments.

Code

function mailhandler_get_plugins($module, $type) {
  ctools_include('plugins');
  $plugins = ctools_get_plugins($module, $type);
  $result = array();
  $weights = array();
  foreach ($plugins as $key => $info) {
    if (!empty($info['hidden'])) {
      continue;
    }
    if (!isset($info['weight'])) {
      $info['weight'] = 10;
    }
    $weights[] = $info['weight'];
    $result[$key] = $info;
  }
  array_multisort($weights, $result);
  return $result;
}