VideoFilter.php in Video Filter 8
File
src/Plugin/CKEditorPlugin/VideoFilter.php
View source
<?php
namespace Drupal\video_filter\Plugin\CKEditorPlugin;
use Drupal\ckeditor\CKEditorPluginInterface;
use Drupal\ckeditor\CKEditorPluginButtonsInterface;
use Drupal\Component\Plugin\PluginBase;
use Drupal\editor\Entity\Editor;
class VideoFilter extends PluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface {
public function getDependencies(Editor $editor) {
return [];
}
public function getLibraries(Editor $editor) {
return [
'core/drupal.ajax',
];
}
public function isInternal() {
return FALSE;
}
public function getFile() {
return drupal_get_path('module', 'video_filter') . '/assets/video_filter.js';
}
public function getButtons() {
return [
'video_filter' => [
'label' => t('Video Filter'),
'image' => drupal_get_path('module', 'video_filter') . '/assets/icon.png',
],
];
}
public function getConfig(Editor $editor) {
return [
'video_filter_dialog_title' => t('Video Filter'),
];
}
}