DrupalLink.php in Zircon Profile 8.0
File
core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php
View source
<?php
namespace Drupal\ckeditor\Plugin\CKEditorPlugin;
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\editor\Entity\Editor;
class DrupalLink extends CKEditorPluginBase {
public function getFile() {
return drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink/plugin.js';
}
public function getLibraries(Editor $editor) {
return array(
'core/drupal.ajax',
);
}
public function getConfig(Editor $editor) {
return array(
'drupalLink_dialogTitleAdd' => t('Add Link'),
'drupalLink_dialogTitleEdit' => t('Edit Link'),
);
}
public function getButtons() {
$path = drupal_get_path('module', 'ckeditor') . '/js/plugins/drupallink';
return array(
'DrupalLink' => array(
'label' => t('Link'),
'image' => $path . '/link.png',
),
'DrupalUnlink' => array(
'label' => t('Unlink'),
'image' => $path . '/unlink.png',
),
);
}
}