AutoLink.php in CKEditor Media Embed Plugin 8
File
src/Plugin/CKEditorPlugin/AutoLink.php
View source
<?php
namespace Drupal\ckeditor_media_embed\Plugin\CKEditorPlugin;
use Drupal\ckeditor_media_embed\AssetManager;
use Drupal\ckeditor_media_embed\CKEditorVersionAwarePluginBase;
use Drupal\editor\Entity\Editor;
class AutoLink extends CKEditorVersionAwarePluginBase {
public function getDependencies(Editor $editor) {
$dependencies = [];
if ($this
->needsTextMatchDependency()) {
$dependencies[] = 'textmatch';
}
return $dependencies;
}
public function needsTextMatchDependency() {
return $this
->versionCompare('4.11') >= 0;
}
public function getLibraries(Editor $editor) {
return [];
}
public function isInternal() {
return FALSE;
}
public function getFile() {
return AssetManager::getCKEditorLibraryPluginPath() . $this
->getPluginId() . '/plugin.js';
}
public function getConfig(Editor $editor) {
return [];
}
}
Classes
Name |
Description |
AutoLink |
Defines the "Media Embed Base" plugin. |