Commit 8f75b2aa authored by catch's avatar catch

Issue #2978922 by brathbone, philipnorton42, msankhala, hardikpandya,...

Issue #2978922 by brathbone, philipnorton42, msankhala, hardikpandya, alexpott, siliconmeadow: Improve batch_process() documentation

(cherry picked from commit 34b94c8c)
parent cdd317eb
......@@ -779,18 +779,18 @@ function batch_set($batch_definition) {
* Form API takes care of batches that were set during form submission.
*
* @param \Drupal\Core\Url|string $redirect
* (optional) Either path or Url object to redirect to when the batch has
* finished processing. Note that to simply force a batch to (conditionally)
* redirect to a custom location after it is finished processing but to
* otherwise allow the standard form API batch handling to occur, it is not
* necessary to call batch_process() and use this parameter. Instead, make
* the batch 'finished' callback return an instance of
* \Symfony\Component\HttpFoundation\RedirectResponse, which will be used
* (optional) Either a path or Url object to redirect to when the batch has
* finished processing. For example, to redirect users to the home page, use
* '<front>'. If you wish to allow standard form API batch handling to occur
* and force the user to be redirected to a custom location after the batch
* has finished processing, you do not need to use batch_process() and this
* parameter. Instead, make the batch 'finished' callback return an instance
* of \Symfony\Component\HttpFoundation\RedirectResponse, which will be used
* automatically by the standard batch processing pipeline (and which takes
* precedence over this parameter).
* User will be redirected to the page that started the batch if this argument
* is omitted and no redirect response was returned by the 'finished'
* callback. Any query arguments will be automatically persisted.
* precedence over this parameter). If this parameter is omitted and no
* redirect response was returned by the 'finished' callback, the user will
* be redirected to the page that started the batch. Any query arguments will
* be automatically persisted.
* @param \Drupal\Core\Url $url
* (optional) URL of the batch processing page. Should only be used for
* separate scripts like update.php.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment