public function TokenBrowser::getButtons in Token Filter 8
NOTE: The keys of the returned array corresponds to the CKEditor button names. They are the first argument of the editor.ui.addButton() or editor.ui.addRichCombo() functions in the plugin.js file.
Overrides CKEditorPluginButtonsInterface::getButtons
1 call to TokenBrowser::getButtons()
- TokenBrowser::getConfig in src/
Plugin/ CKEditorPlugin/ TokenBrowser.php - Returns the additions to CKEDITOR.config for a specific CKEditor instance.
File
- src/
Plugin/ CKEditorPlugin/ TokenBrowser.php, line 73
Class
- TokenBrowser
- Defines the "tokenbrowser" plugin.
Namespace
Drupal\token_filter\Plugin\CKEditorPluginCode
public function getButtons($token_types = NULL) {
return [
'tokenbrowser' => [
'id' => 'tokenbrowser',
'label' => t('Token browser'),
'image' => file_create_url($this
->getImage()),
'link' => $this
->getUrl($token_types)
->toString(),
],
];
}