Further modules included.
[yaffs-website] / web / modules / contrib / ckeditor_widgets / src / Plugin / CKEditorPlugin / WidgetBootstrap.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 "widgetbootstrap" plugin.
14  *
15  * @CKEditorPlugin(
16  *   id = "widgetbootstrap",
17  *   label = @Translation("CKEditor Bootstrap Widgets"),
18  *   module = "ckeditor_widgets"
19  * )
20  */
21 class WidgetBootstrap 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/widgetbootstrap/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             'widgetbootstrapLeftCol' => array(
56                 'label' => $this->t('Insert left column box'),
57                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapLeftCol.png',
58             ),
59             'widgetbootstrapRightCol' => array(
60                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapRightCol.png',
61                 'label' => $this->t('Insert right column box'),
62             ),
63             'widgetbootstrapTwoCol' => array(
64                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapTwoCol.png',
65                 'label' => $this->t('Insert two column box'),
66             ),
67             'widgetbootstrapThreeCol' => array(
68                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapThreeCol.png',
69                 'label' => $this->t('Insert three column box'),
70             ),
71             'widgetbootstrapAlert' => array(
72                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapAlert.png',
73                 'label' => $this->t('Insert alert box'),
74             ),
75             'widgetbootstrapAccordion' => array(
76                 'image' => drupal_get_path('module', 'ckeditor_widgets') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapAccordion.png',
77                 'label' => $this->t('Insert accordion box'),
78             ),
79         );
80     }
81
82     /**
83      * {@inheritdoc}
84      */
85     public function getConfig(Editor $editor) {
86         return array();
87     }
88 }