Skip to content
Snippets Groups Projects
Commit 32846d4f authored by theduke's avatar theduke Committed by Chris Leppanen
Browse files

Issue #1703074 by theduke: Added Include parser result in hook_feeds_presave().

parent 2ba69d6a
No related branches found
No related tags found
No related merge requests found
...@@ -104,8 +104,10 @@ function hook_feeds_after_parse(FeedsSource $source, FeedsParserResult $result) ...@@ -104,8 +104,10 @@ function hook_feeds_after_parse(FeedsSource $source, FeedsParserResult $result)
* FeedsSource object that describes the source that is being imported. * FeedsSource object that describes the source that is being imported.
* @param $entity * @param $entity
* The entity object. * The entity object.
* @param $item
* The parser result for this entity.
*/ */
function hook_feeds_presave(FeedsSource $source, $entity) { function hook_feeds_presave(FeedsSource $source, $entity, $item) {
if ($entity->feeds_item->entity_type == 'node') { if ($entity->feeds_item->entity_type == 'node') {
// Skip saving this entity. // Skip saving this entity.
$entity->feeds_item->skip = TRUE; $entity->feeds_item->skip = TRUE;
......
...@@ -132,7 +132,7 @@ abstract class FeedsProcessor extends FeedsPlugin { ...@@ -132,7 +132,7 @@ abstract class FeedsProcessor extends FeedsPlugin {
$this->entityValidate($entity); $this->entityValidate($entity);
// Allow modules to alter the entity before saving. // Allow modules to alter the entity before saving.
module_invoke_all('feeds_presave', $source, $entity); module_invoke_all('feeds_presave', $source, $entity, $item);
if (module_exists('rules')) { if (module_exists('rules')) {
rules_invoke_event('feeds_import_'. $source->importer()->id, $entity); rules_invoke_event('feeds_import_'. $source->importer()->id, $entity);
} }
......
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