You are here

function hook_feeds_after_import in Feeds 7.2

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

Invoked after a feed source has been imported.

Parameters

FeedsSource $source: FeedsSource object that describes the source that has been imported.

Related topics

1 invocation of hook_feeds_after_import()
FeedsSource::finishImport in includes/FeedsSource.inc
Cleans up after an import.

File

./feeds.api.php, line 224
Documentation of Feeds hooks.

Code

function hook_feeds_after_import(FeedsSource $source) {

  // We can also check for an exception in this hook. The exception should not
  // be thrown here, Feeds will handle it.
  if (isset($source->exception)) {
    watchdog('mymodule', 'An exception occurred during importing!', array(), WATCHDOG_ERROR);
    mymodule_panic_reaction($source);
  }
}