function hook_feeds_presave in Feeds 7.2
Same name and namespace in other branches
- 8.2 feeds.api.php \hook_feeds_presave()
Invoked before a feed item is saved.
Parameters
FeedsSource $source: FeedsSource object that describes the source that is being imported.
object $entity: The entity object.
array $item: The parser result for this entity.
int|null $entity_id: The id of the current item which is going to be updated. If this is a new item, then NULL is passed.
Related topics
2 functions implement hook_feeds_presave()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- entity_translation_feeds_presave in mappers/
entity_translation.inc - Implements hook_feeds_presave().
- field_feeds_presave in mappers/
field.inc - Implements hook_feeds_presave().
1 invocation of hook_feeds_presave()
- FeedsProcessor::process in plugins/
FeedsProcessor.inc - Process the result of the parsing stage.
File
- ./
feeds.api.php, line 185 - Documentation of Feeds hooks.
Code
function hook_feeds_presave(FeedsSource $source, $entity, $item, $entity_id) {
if ($entity->feeds_item->entity_type == 'node') {
// Skip saving this entity.
$entity->feeds_item->skip = TRUE;
}
}