public function JsResponse::setData in JS Callback Handler 8.3
Sets the data returned from a callback.
Parameters
mixed $data: The data to set.
Return value
$this
File
- src/
JsResponse.php, line 206
Class
- JsResponse
- JsResponse.
Namespace
Drupal\jsCode
public function setData($data = []) {
$this->data = $data;
$this
->setContent($this->data);
return $this;
}