function node_recur_node_batch_start in Node recur 7.2
Same name and namespace in other branches
- 7 node_recur.batch.inc \node_recur_node_batch_start()
Start the batch to generate recurring nodes
1 call to node_recur_node_batch_start()
- node_recur_node_recur_confirm_submit in ./
node_recur.pages.inc - Submit the node recur confirmation form
File
- ./
node_recur.module, line 148
Code
function node_recur_node_batch_start($node, $dates) {
// Generate the batch operations
$operations = array();
if (!empty($dates)) {
foreach ($dates as $date) {
$operations[] = array(
'node_recur_node_batch_create_node',
array(
$node,
$date,
),
);
}
// Generate the batch
$batch = array(
'title' => t('Generating items'),
'operations' => $operations,
'finished' => 'node_recur_node_batch_finished',
'file' => drupal_get_path('module', 'node_recur') . '/node_recur.batch.inc',
);
batch_set($batch);
batch_process("node/{$node->nid}");
}
}