WidgetBootstrap.php in CKEditor Widgets Bootstrap Grid 8
File
src/Plugin/CKEditorPlugin/WidgetBootstrap.php
View source
<?php
namespace Drupal\ckeditor_bootstrap_grid\Plugin\CKEditorPlugin;
use Drupal\editor\Entity\Editor;
use Drupal\ckeditor\CKEditorPluginBase;
class WidgetBootstrap extends CKEditorPluginBase {
public function getFile() {
return drupal_get_path('module', 'ckeditor_bootstrap_grid') . '/js/plugins/widgetbootstrap/plugin.js';
}
public function getDependencies(Editor $editor) {
return [];
}
public function getLibraries(Editor $editor) {
return [];
}
public function isInternal() {
return FALSE;
}
public function getButtons() {
return [
'widgetbootstrapLeftCol' => [
'label' => $this
->t('Insert left column box'),
'image' => drupal_get_path('module', 'ckeditor_bootstrap_grid') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapLeftCol.png',
],
'widgetbootstrapRightCol' => [
'image' => drupal_get_path('module', 'ckeditor_bootstrap_grid') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapRightCol.png',
'label' => $this
->t('Insert right column box'),
],
'widgetbootstrapTwoCol' => [
'image' => drupal_get_path('module', 'ckeditor_bootstrap_grid') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapTwoCol.png',
'label' => $this
->t('Insert two column box'),
],
'widgetbootstrapThreeCol' => [
'image' => drupal_get_path('module', 'ckeditor_bootstrap_grid') . '/js/plugins/widgetbootstrap/icons/widgetbootstrapThreeCol.png',
'label' => $this
->t('Insert three column box'),
],
];
}
public function getConfig(Editor $editor) {
return [];
}
}