1312658d70ebf7c8d58bbca968ecb4ceda0a7beb
[yaffs-website] / web / core / modules / ckeditor / tests / modules / src / Plugin / CKEditorPlugin / LlamaCss.php
1 <?php
2
3 namespace Drupal\ckeditor_test\Plugin\CKEditorPlugin;
4
5 use Drupal\ckeditor\CKEditorPluginButtonsInterface;
6 use Drupal\ckeditor\CKEditorPluginCssInterface;
7 use Drupal\editor\Entity\Editor;
8
9 /**
10  * Defines a "LlamaCss" plugin, with an associated "llama" CSS.
11  *
12  * @CKEditorPlugin(
13  *   id = "llama_css",
14  *   label = @Translation("Llama CSS")
15  * )
16  */
17 class LlamaCss extends Llama implements CKEditorPluginButtonsInterface, CKEditorPluginCssInterface {
18
19   /**
20    * {@inheritdoc}
21    */
22   public function getButtons() {
23     return [
24       'LlamaCSS' => [
25         'label' => t('Insert Llama CSS'),
26       ],
27     ];
28   }
29
30   /**
31    * {@inheritdoc}
32    */
33   public function getCssFiles(Editor $editor) {
34     return [
35       drupal_get_path('module', 'ckeditor_test') . '/css/llama.css',
36     ];
37   }
38
39   /**
40    * {@inheritdoc}
41    */
42   public function getFile() {
43     return drupal_get_path('module', 'ckeditor_test') . '/js/llama_css.js';
44   }
45
46 }