You are here

function feeds_batch_set in Feeds 6

Same name and namespace in other branches
  1. 7 feeds.module \feeds_batch_set()

Batch helper.

Parameters

$title: Title to show to user when executing batch.

$method: Method to execute on importer; one of 'import', 'clear' or 'expire'.

$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.

4 calls to feeds_batch_set()
feeds_delete_tab_form_submit in ./feeds.pages.inc
Submit handler for feeds_delete_tab_form().
feeds_import_form_submit in ./feeds.pages.inc
Submit handler for feeds_import_form().
feeds_import_tab_form_submit in ./feeds.pages.inc
Submit handler for feeds_import_tab_form().
feeds_nodeapi in ./feeds.module
Implementation of hook_nodeapi().

File

./feeds.module, line 533
Feeds - basic API functions and hook implementations.

Code

function feeds_batch_set($title, $method, $importer_id, $feed_nid = 0) {
  $batch = array(
    'title' => $title,
    'operations' => array(
      array(
        'feeds_batch',
        array(
          $method,
          $importer_id,
          $feed_nid,
        ),
      ),
    ),
    'progress_message' => '',
  );
  batch_set($batch);
}