You are here

function feeds_importer_load in Feeds 7.2

Same name and namespace in other branches
  1. 8.2 feeds.module \feeds_importer_load()
  2. 6 feeds.module \feeds_importer_load()
  3. 7 feeds.module \feeds_importer_load()

Menu loader callback.

Parameters

string $id: The ID of the importer to load.

Return value

FeedsImporter|false A FeedsImporter instance if found. False otherwise.

Related topics

6 calls to feeds_importer_load()
drush_feeds_clear in ./feeds.drush.inc
Clears a Feeds importer.
drush_feeds_import in ./feeds.drush.inc
Imports a given importer/source.
FeedsHooksTestCase::testHookConfigDefaults in tests/feeds_hooks.test
Tests the hook hook_config_defaults().
FeedsHooksTestCase::testHookPluginTypeConfigDefaults in tests/feeds_hooks.test
Tests the hook hook_PLUGIN_TYPE_config_defaults().
FeedsUIUserInterfaceTestCase::testInvalidConfigurationWhenImportingImporter in feeds_ui/feeds_ui.test
Tests if the user is warned when importing an importer with invalid configuration.

... See full list

File

./feeds.module, line 475
Feeds - basic API functions and hook implementations.

Code

function feeds_importer_load($id) {
  try {
    $importer = feeds_importer($id);
    if ($importer
      ->doesExist()) {
      return $importer;
    }
  } catch (InvalidArgumentException $e) {
  }
  return FALSE;
}