You are here

public function Js::getCallback in JS Callback Handler 8.3

Retrieves the set callback.

Return value

\Drupal\js\Plugin\Js\JsCallbackInterface

1 call to Js::getCallback()
Js::execute in src/Js.php
Executes the requested JS Callback.

File

src/Js.php, line 407

Class

Js
JS Callback Handler service.

Namespace

Drupal\js

Code

public function getCallback() {

  // Retrieve the provided callback, defaulting to "js.content" if not set.
  if (!isset($this->callback)) {
    $this->callback = $this->callbackManager
      ->createInstance($this
      ->getJsParameter('callback', 'js.content'));
  }
  return $this->callback;
}