protected function TokenBrowser::getUrl in Token Filter 8
Fetches the URL.
Return value
Drupal\Core\Url The URL.
See also
TokenTreeController::outputTree().
File
- src/
Plugin/ CKEditorPlugin/ TokenBrowser.php, line 92
Class
- TokenBrowser
- Defines the "tokenbrowser" plugin.
Namespace
Drupal\token_filter\Plugin\CKEditorPluginCode
protected function getUrl($token_types = NULL) {
$url = Url::fromRoute('token.tree');
$options['query'] = [
'options' => Json::encode($this
->getQueryOptions($token_types)),
'token' => $this->csrfTokenService
->get($url
->getInternalPath()),
];
$url
->setOptions($options);
return $url;
}