You are here

function my_source_get_source in Feeds 7

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

Example callback specified in hook_feeds_parser_sources_alter().

To be invoked on mapping time.

Parameters

$batch: The FeedsImportBatch object being mapped from.

$key: The key specified in the $sources array in hook_feeds_parser_sources_alter().

Return value

The value to be extracted from the source.

See also

hook_feeds_parser_sources_alter().

locale_feeds_get_source().

Related topics

1 string reference to 'my_source_get_source'
hook_feeds_parser_sources_alter in ./feeds.api.php
Alter mapping sources.

File

./feeds.api.php, line 169

Code

function my_source_get_source(FeedsImportBatch $batch, $key) {
  $item = $batch
    ->currentItem();
  return my_source_parse_images($item['description']);
}