Skip to content
Snippets Groups Projects
Commit d82aa81f authored by Alex Barth's avatar Alex Barth
Browse files

#906720 alex_b: Introduce a hook_feeds_after_clear().

parent ebc2016b
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
Feeds 6.x 1.0 XXXXXXXXXXXXXXXXXX
--------------------------------
- #906720 alex_b: Introduce a hook_feeds_after_clear().
- #905820 tristan.oneil: Adjust delete message in FeedsDataProcessor to avoid
misleading total numbers.
- #671538 mburak: Use CURLOPT_TIMEOUT to limit download time of feeds.
......
......@@ -82,7 +82,7 @@ function hook_feeds_plugins() {
*/
/**
* @defgroup import Import hooks
* @defgroup import Import and clear hooks
* @{
*/
......@@ -98,6 +98,17 @@ function hook_feeds_after_import(FeedsImporter $importer, FeedsSource $source) {
// See geotaxonomy module's implementation for an example.
}
/**
* Invoked after a feed source has been cleared of its items.
*
* @param $importer
* FeedsImporter object that has been used for clearing the feed.
* @param $source
* FeedsSource object that describes the source that has been cleared.
*/
function hook_feeds_after_clear(FeedsImporter $importer, FeedsSource $source) {
}
/**
* @}
*/
......
......@@ -178,6 +178,7 @@ class FeedsSource extends FeedsConfigurable {
$result = $this->batch->getProgress();
if ($result == FEEDS_BATCH_COMPLETE) {
unset($this->batch);
module_invoke_all('feeds_after_clear', $this->importer, $this);
}
}
catch (Exception $e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment