function EnforcedResponse::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Form/EnforcedResponse.php \Drupal\Core\Form\EnforcedResponse::__construct()
- 10 core/lib/Drupal/Core/Form/EnforcedResponse.php \Drupal\Core\Form\EnforcedResponse::__construct()
- 9 core/lib/Drupal/Core/Form/EnforcedResponse.php \Drupal\Core\Form\EnforcedResponse::__construct()
- 8.9.x core/lib/Drupal/Core/Form/EnforcedResponse.php \Drupal\Core\Form\EnforcedResponse::__construct()
Constructs an enforced response.
Use EnforcedResponse::createFromException() instead.
Parameters
\Symfony\Component\HttpFoundation\Response $response: The response to wrap.
File
-
core/
lib/ Drupal/ Core/ Form/ EnforcedResponse.php, line 55
Class
- EnforcedResponse
- A wrapper containing a response which is to be enforced upon delivery.
Namespace
Drupal\Core\FormCode
public function __construct(protected Response $response) {
parent::__construct('', 500);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.