FormState::$response

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::response
  2. 10 core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::response
  3. 11.x core/lib/Drupal/Core/Form/FormState.php \Drupal\Core\Form\FormState::response

The response object.

Used when a form needs to return some kind of a \Symfony\Component\HttpFoundation\Response object, e.g., a \Symfony\Component\HttpFoundation\BinaryFileResponse when triggering a file download. If you use self::setRedirect() or self::setRedirectUrl(), it will be used to build a \Symfony\Component\HttpFoundation\RedirectResponse and will populate this key.

Type: \Symfony\Component\HttpFoundation\Response|null

File

core/lib/Drupal/Core/Form/FormState.php, line 137

Class

FormState
Stores information about the state of a form.

Namespace

Drupal\Core\Form

Code

protected $response;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.