birthdays_set_batch

Versions
6
birthdays_set_batch($title, $operation_callback)

Set the batch for either synchronisation processes.

▾ 2 functions call birthdays_set_batch()

birthdays_sync_birthdays_to_profiles in contributions/birthdays/birthdays.sync.inc
Birthdays to Profile submit handler.
birthdays_sync_profiles_to_birthdays in contributions/birthdays/birthdays.sync.inc
Profile to Birthdays submit handler.

Code

contributions/birthdays/birthdays.sync.inc, line 75

<?php
function birthdays_set_batch($title, $operation_callback) {
  global $_birthdays_field;

  $batch = array(
    'title' => $title,
    'operations' => array(
        array($operation_callback, array($_birthdays_field)),
    ),
    'finished' => 'batch_birthdays_sync_finished',
    'init_message' => t('Synchronization is starting.'),
    'progress_message' => t('Synchronizing'),
    'file' => drupal_get_path('module', 'birthdays'). '/birthdays.sync.inc',
  );

  // Set the batch. It will start immediately, because it is called from a
  // submit handler.
  batch_set($batch);
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.