DrupalViews.php in Views entity embed 2.0.x
File
src/Plugin/CKEditorPlugin/DrupalViews.php
View source
<?php
namespace Drupal\views_entity_embed\Plugin\CKEditorPlugin;
use Drupal\editor\Entity\Editor;
use Drupal\embed\EmbedCKEditorPluginBase;
class DrupalViews extends EmbedCKEditorPluginBase {
public function getFile() {
return drupal_get_path('module', 'views_entity_embed') . '/js/plugins/drupalviews/plugin.js';
}
public function getConfig(Editor $editor) {
return [
'DrupalViews_dialogTitleAdd' => t('Insert views'),
'DrupalViews_dialogTitleEdit' => t('Edit views'),
'DrupalViews_buttons' => $this
->getButtons(),
];
}
public function getLibraries(Editor $editor) {
return [
'core/jquery',
'core/drupal',
'core/drupal.ajax',
];
}
}