batch_example_op_1

Definition

batch_example_op_1($nid, &$context)
developer/examples/batch_example.module, line 173

Description

Batch operation for batch 1 : lode a node...

Related topics

Namesort iconDescription
Example batch definitionsDefinitions of the batches used in this module.

Code

<?php
function batch_example_op_1($nid, &$context) {
  $node = node_load($nid, NULL, TRUE);

  // Store some result for post-processing in the finished callback.
  $context['results'][] = $node->nid .' : '. $node->title;

  // Optional message displayed under the progressbar.
  $context['message'] = 'Loading '. $node->title;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.