function Response::setContent
Sets the response content.
Return value
$this
7 calls to Response::setContent()
- HtmlResponse::setContent in core/
lib/ Drupal/ Core/ Render/ HtmlResponse.php - Sets the response content.
- HtmlResponse::setContent in core/
lib/ Drupal/ Core/ Render/ HtmlResponse.php - Sets the response content.
- JsonResponse::update in vendor/
symfony/ http-foundation/ JsonResponse.php - Updates the content and headers according to the JSON data and callback.
- RedirectResponse::setTargetUrl in vendor/
symfony/ http-foundation/ RedirectResponse.php - Sets the redirect target of this response.
- Response::prepare in vendor/
symfony/ http-foundation/ Response.php - Prepares the Response before it is sent to the client.
3 methods override Response::setContent()
- BinaryFileResponse::setContent in vendor/
symfony/ http-foundation/ BinaryFileResponse.php - HtmlResponse::setContent in core/
lib/ Drupal/ Core/ Render/ HtmlResponse.php - Sets the response content.
- StreamedResponse::setContent in vendor/
symfony/ http-foundation/ StreamedResponse.php
File
-
vendor/
symfony/ http-foundation/ Response.php, line 418
Class
- Response
- Response represents an HTTP response.
Namespace
Symfony\Component\HttpFoundationCode
public function setContent(?string $content) : static {
$this->content = $content ?? '';
return $this;
}