π | Drupal core | Documentation for batch api callback_batch_finished() doesn't say that a RedirectResponse can be returned.
moved comment that was placed after line of code.
π | Drupal core | Documentation for batch api callback_batch_finished() doesn't say that a RedirectResponse can be returned.
π | Drupal core | Documentation for batch api callback_batch_finished() doesn't say that a RedirectResponse can be returned.
Did the codestyle fixes Joachim suggested.
π | Drupal core | Documentation for batch api callback_batch_finished() doesn't say that a RedirectResponse can be returned.
Updated documentation for callback_batch_finished to include RedirectResponse.
And added an example:
// Optionally, redirect if needed.
if (shouldRedirect()) { // Assume shouldRedirect() is a function that determines if a redirect is necessary.
return new \Drupal\Core\Routing\RedirectResponse(\Drupal\Core\Url::fromRoute('example.route')->toString());
}
π | Drupal core | Documentation for batch api callback_batch_finished() doesn't say that a RedirectResponse can be returned.
diederik.beirnaert β made their first commit to this issueβs fork.