コード例 #1
0
/**
 * Invoked after a feed source has been parsed, before it will be processed.
 *
 * @param $importer
 *   FeedsImporter object that has been used for importing the feed.
 * @param $source
 *  FeedsSource object that describes the source that has been imported.
 */
function hook_feeds_after_parse(FeedsImporter $importer, FeedsSource $source)
{
    // For example, set title of imported content:
    $source->batch->setTitle('Import number ' . my_module_import_id());
}
コード例 #2
0
/**
 * Invoked after a feed source has been parsed, before it will be processed.
 *
 * @param $source
 *  FeedsSource object that describes the source that has been imported.
 * @param $result
 *   FeedsParserResult object that has been parsed from the source.
 */
function hook_feeds_after_parse(FeedsSource $source, FeedsParserResult $result)
{
    // For example, set title of imported content:
    $result->title = 'Import number ' . my_module_import_id();
}