Further modules included.
[yaffs-website] / web / modules / contrib / ckeditor_widgets / src / Plugin / CKEditorPlugin / WidgetCommon.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 "widgetcommon" plugin.
14  *
15  * @CKEditorPlugin(
16  *   id = "widgetcommon",
17  *   label = @Translation("CKEditor Common Widgets"),
18  *   module = "ckeditor_widgets"
19  * )
20  */
21 class WidgetCommon 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/widgetcommon/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             'widgetcommonBox' => array(
56                 'label' => $this->t('Insert box'),
57                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetcommon/icons/widgetcommonBox.png',
58             ),
59             'widgetcommonQuotebox' => array(
60                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetcommon/icons/widgetcommonQuotebox.png',
61                 'label' => $this->t('Insert quote box'),
62             ),
63         );
64     }
65
66     /**
67      * {@inheritdoc}
68      */
69     public function getConfig(Editor $editor) {
70         return array();
71     }
72 }