Further modules included.
[yaffs-website] / web / modules / contrib / ckeditor_widgets / src / Plugin / CKEditorPlugin / WidgetTemplateMenu.php
1 <?php
2
3 /**
4  * @file
5  * Definition of \Drupal\ckeditor_widgets\Plugin\CKEditorPlugin\AnchorLink.
6  */
7 namespace Drupal\ckeditor_widgets\Plugin\CKEditorPlugin;
8
9 use Drupal\editor\Entity\Editor;
10 use Drupal\ckeditor\CKEditorPluginBase;
11
12 /**
13  * Defines the "widgettemplatemenu" plugin.
14  *
15  * @CKEditorPlugin(
16  *   id = "widgettemplatemenu",
17  *   label = @Translation("CKEditor Template Menu Widgets"),
18  *   module = "ckeditor_widgets"
19  * )
20  */
21 class WidgetTemplateMenu extends CKEditorPluginBase {
22
23     /**
24      * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile().
25      */
26     function getFile() {
27         return drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/plugin.js';
28     }
29
30     /**
31      * {@inheritdoc}
32      */
33     public function getDependencies(Editor $editor) {
34         return array();
35     }
36     /**
37      * {@inheritdoc}
38      */
39     public function getLibraries(Editor $editor) {
40         return array();
41     }
42
43     /**
44      * {@inheritdoc}
45      */
46     public function isInternal() {
47         return FALSE;
48     }
49
50     /**
51      * Implements \Drupal\ckeditor\Plugin\CKEditorPluginButtonsInterface::getButtons().
52      */
53     function getButtons() {
54         return array(
55             'oembed' => array(
56                 'label' => $this->t('Insert media'),
57                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/oembed.png',
58             ),
59             'codeSnippet' => array(
60                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/codesnippet.png',
61                 'label' => $this->t('Insert code snippet'),
62             ),
63             'leaflet' => array(
64                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/leaflet.png',
65                 'label' => $this->t('Insert leaflet map'),
66             ),
67             'FontAwesome' => array(
68                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/extraIcons/fontawesome.png',
69                 'label' => $this->t('Insert Font Awesome icon'),
70             ),
71             'WidgetTemplateMenu' => array(
72                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgettemplatemenu/icons/widgettemplatemenu.png',
73                 'label' => $this->t('Add Template Menu'),
74             ),
75         );
76     }
77
78     /**
79      * {@inheritdoc}
80      */
81     public function getConfig(Editor $editor) {
82         return array();
83     }
84 }