You are here

function callback_my_source_get_source in Feeds 7.2

Returns a value to use as a mapping source.

Callback for hook_feeds_parser_sources_alter().

This function is called on mapping time.

Parameters

FeedsSource $source: The FeedsSource object being imported.

FeedsParserResult $result: The FeedsParserResult object being mapped from.

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

Return value

mixed 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 'callback_my_source_get_source'
hook_feeds_parser_sources_alter in ./feeds.api.php
Alter mapping sources.

File

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

Code

function callback_my_source_get_source(FeedsSource $source, FeedsParserResult $result, $key) {
  $item = $result
    ->currentItem();
  return my_source_parse_images($item['description']);
}