You are here

public function Js::getResponse in JS Callback Handler 8.3

Retrieves the currently set callback response object.

Return value

\Drupal\js\JsResponse

2 calls to Js::getResponse()
Js::deliver in src/Js.php
Sends content to the browser via the delivery callback.
Js::execute in src/Js.php
Executes the requested JS Callback.

File

src/Js.php, line 478

Class

Js
JS Callback Handler service.

Namespace

Drupal\js

Code

public function getResponse() {
  if (!isset($this->response)) {
    $this->response = $this
      ->getCallback()
      ->getResponse()
      ->setJs($this);
  }
  return $this->response;
}