You are here

public function Js::isExecuting in JS Callback Handler 8.3

Indicates if the current request is executing a JS Callback.

Parameters

\Symfony\Component\HttpFoundation\Request $request: (Optional) A request object to check. If not provided, the current request will be used.

Return value

bool TRUE or FALSE

1 call to Js::isExecuting()
Js::checkForRedirection in src/Js.php
Checks the result from a callback to determine if it's redirection.

File

src/Js.php, line 573

Class

Js
JS Callback Handler service.

Namespace

Drupal\js

Code

public function isExecuting(Request $request = NULL) {
  if (!isset($request)) {
    $request = $this
      ->getRequest();
  }
  return $request
    ->get('_controller') === 'js.callback:execute';
}