class LlamaButton in Drupal 9
Same name and namespace in other branches
- 8 core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaButton.php \Drupal\ckeditor_test\Plugin\CKEditorPlugin\LlamaButton
Defines a "LlamaButton" plugin, with a toolbar builder-enabled "llama" feature.
Plugin annotation
@CKEditorPlugin(
id = "llama_button",
label = @Translation("Llama Button")
)
Hierarchy
- class \Drupal\ckeditor_test\Plugin\CKEditorPlugin\LlamaButton extends \Drupal\ckeditor_test\Plugin\CKEditorPlugin\Llama implements CKEditorPluginButtonsInterface
Expanded class hierarchy of LlamaButton
File
- core/
modules/ ckeditor/ tests/ modules/ src/ Plugin/ CKEditorPlugin/ LlamaButton.php, line 15
Namespace
Drupal\ckeditor_test\Plugin\CKEditorPluginView source
class LlamaButton extends Llama implements CKEditorPluginButtonsInterface {
/**
* {@inheritdoc}
*/
public function getButtons() {
return [
'Llama' => [
'label' => t('Insert Llama'),
],
];
}
/**
* {@inheritdoc}
*/
public function getFile() {
return $this->moduleList
->getPath('ckeditor_test') . '/js/llama_button.js';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CKEditorPluginInterface:: |
public | function | Returns the additions to CKEDITOR.config for a specific CKEditor instance. | 7 |
CKEditorPluginInterface:: |
public | function | Returns a list of plugins this plugin requires. | 2 |
CKEditorPluginInterface:: |
public | function | Returns a list of libraries this plugin requires. | 2 |
CKEditorPluginInterface:: |
public | function | Indicates if this plugin is part of the optimized CKEditor build. | 2 |
LlamaButton:: |
public | function |
Returns the buttons that this plugin provides, along with metadata. Overrides CKEditorPluginButtonsInterface:: |
|
LlamaButton:: |
public | function |
Returns the Drupal root-relative file path to the plugin JavaScript file. Overrides CKEditorPluginInterface:: |
|
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |