You are here

function hook_feeds_plugins in Feeds 7

Same name and namespace in other branches
  1. 8.2 feeds.api.php \hook_feeds_plugins()
  2. 6 feeds.api.php \hook_feeds_plugins()
  3. 7.2 feeds.api.php \hook_feeds_plugins()

A hook_feeds_plugins() declares available Fetcher, Parser or Processor plugins to Feeds. For an example look at feeds_feeds_plugin(). For exposing this hook hook_ctools_plugin_api() MUST be implemented, too.

See also

feeds_feeds_plugin()

Related topics

1 function implements hook_feeds_plugins()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

feeds_feeds_plugins in ./feeds.module
Implements hook_feeds_plugins().

File

./feeds.api.php, line 41

Code

function hook_feeds_plugins() {
  $info = array();
  $info['MyFetcher'] = array(
    'name' => 'My Fetcher',
    'description' => 'Fetches my stuff.',
    'help' => 'More verbose description here. Will be displayed on fetcher selection menu.',
    'handler' => array(
      'parent' => 'FeedsFetcher',
      'class' => 'MyFetcher',
      'file' => 'MyFetcher.inc',
      'path' => drupal_get_path('module', 'my_module'),
    ),
  );
  $info['MyParser'] = array(
    'name' => 'ODK parser',
    'description' => 'Parse my stuff.',
    'help' => 'More verbose description here. Will be displayed on parser selection menu.',
    'handler' => array(
      'parent' => 'FeedsParser',
      // Being directly or indirectly an extension of FeedsParser makes a plugin a parser plugin.
      'class' => 'MyParser',
      'file' => 'MyParser.inc',
      'path' => drupal_get_path('module', 'my_module'),
    ),
  );
  $info['MyProcessor'] = array(
    'name' => 'ODK parser',
    'description' => 'Process my stuff.',
    'help' => 'More verbose description here. Will be displayed on processor selection menu.',
    'handler' => array(
      'parent' => 'FeedsProcessor',
      'class' => 'MyProcessor',
      'file' => 'MyProcessor.inc',
      'path' => drupal_get_path('module', 'my_module'),
    ),
  );
  return $info;
}