summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNathaniel Catchpole2019-01-07 11:34:38 (GMT)
committerNathaniel Catchpole2019-01-07 11:35:10 (GMT)
commit8f75b2aaccb756b0a8d1025cf5ce128cd039990d (patch)
treee9861fb7afbd4896943b650def92909032a6089d /core
parentcdd317ebc6ecfc1f903f3993762e5d3ecd4ac0dd (diff)
Issue #2978922 by brathbone, philipnorton42, msankhala, hardikpandya, alexpott, siliconmeadow: Improve batch_process() documentation
(cherry picked from commit 34b94c8c3a49f8eb4503b5a8044d78aac6829b2e)
Diffstat (limited to 'core')
-rw-r--r--core/includes/form.inc22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/includes/form.inc b/core/includes/form.inc
index dacae87..36490f6 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -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.