batch_example_batch_2
developer/examples/batch_example.module, строка 186
- Версии
- 6
batch_example_batch_2()
Batch 2 : load all nodes 5 by 5, 20 times (Multipart operation)
Связанные темы
Код
<?php
function batch_example_batch_2() {
$operations = array();
for ($i = 0; $i<20; $i++) {
$operations[] = array('batch_example_op_2', array());
}
$batch = array(
'operations' => $operations,
'finished' => 'batch_example_finished',
// We can define custom messages instead of the default ones.
'title' => t('Processing batch 2'),
'init_message' => t('Batch 2 is starting.'),
'progress_message' => t('Processed @current out of @total.'),
'error_message' => t('Batch 1 has encountered an error.'),
);
return $batch;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии