You are here

function mailhandler_get_plugins in Mailhandler 7.2

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

Wrapper to load plugins.

Parameters

string $type: type of mailhandler plugins to retrieve.

8 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
Parse and apply commands.
MailhandlerParser::configForm in plugins/feeds/plugins/MailhandlerParser.class.php
Build configuration form.
MailhandlerParser::getMappingSources in plugins/feeds/plugins/MailhandlerParser.class.php
This defines sources which user's can select to map values to.
MailhandlerParser::sourceForm in plugins/feeds/plugins/MailhandlerParser.class.php
Implements sourceForm().

... See full list

File

./mailhandler.module, line 143
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;
}