_batch_next_set

function _batch_next_set

_batch_next_set()

Retrieves the next set in a batch.

If there is a subsequent set in this batch, assign it as the new set to process and execute its form submit handler (if defined), which may add further sets to this batch.

Return value

TRUE if a subsequent set was found in the batch.

File

includes/batch.inc, line 433
Batch processing API for processes to run in multiple HTTP requests.

Code

function _batch_next_set() {
  $batch = &batch_get();
  if (isset($batch['sets'][$batch['current_set'] + 1])) {
    $batch['current_set']++;
    $current_set = &_batch_current_set();
    if (isset($current_set['form_submit']) && ($function = $current_set['form_submit']) && function_exists($function)) {
      // We use our stored copies of $form and $form_state to account for
      // possible alterations by previous form submit handlers.
      $function($batch['form_state']['complete form'], $batch['form_state']);
    }
    return TRUE;
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!batch.inc/function/_batch_next_set/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部