You are here

function hook_feeds_after_parse in Feeds 8.2

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

Invoked after a feed source has been parsed, before it will be processed.

Parameters

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

FeedsParserResult $result: FeedsParserResult object that has been parsed from the source.

Related topics

2 invocations of hook_feeds_after_parse()
FeedsSource::import in lib/Drupal/feeds/FeedsSource.php
Import a source: execute fetching, parsing and processing stage.
FeedsSource::preview in lib/Drupal/feeds/FeedsSource.php
Preview = fetch and parse a feed.

File

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

Code

function hook_feeds_after_parse(FeedsSource $source, FeedsParserResult $result) {

  // For example, set title of imported content:
  $result->title = 'Import number ' . my_module_import_id();
}