function feeds_batch in Feeds 6
Same name and namespace in other branches
- 8.2 feeds.module \feeds_batch()
- 7.2 feeds.module \feeds_batch()
- 7 feeds.module \feeds_batch()
Batch callback.
Parameters
$method: Method to execute on importer; one of 'import' or 'clear'.
$importer_id: Identifier of a FeedsImporter object.
$feed_nid: If importer is attached to content type, feed node id identifying the source to be imported.
$context: Batch context.
1 string reference to 'feeds_batch'
- feeds_batch_set in ./
feeds.module - Batch helper.
File
- ./
feeds.module, line 557 - Feeds - basic API functions and hook implementations.
Code
function feeds_batch($method, $importer_id, $feed_nid = 0, &$context) {
$context['finished'] = 1;
try {
$context['finished'] = feeds_source($importer_id, $feed_nid)
->{$method}();
} catch (Exception $e) {
drupal_set_message($e
->getMessage(), 'error');
}
}