You are here

public function Content::access in JS Callback Handler 8.3

Access callback.

Return value

bool TRUE if the callback can be accessed, FALSE otherwise.

Overrides JsCallbackBase::access

File

src/Plugin/Js/Content.php, line 60

Class

Content
Plugin annotation @JsCallback( id = "js.content", allowed_methods = { "GET" }, csrf_token = FALSE, )

Namespace

Drupal\js\Plugin\Js

Code

public function access($path = '') {
  return \Drupal::accessManager()
    ->checkRequest($this
    ->getRequest($path));
}