function DrupalLink::getButtons

Same name and namespace in other branches
  1. 8.9.x core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalLink::getButtons()

File

core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php, line 48

Class

DrupalLink
Defines the "drupallink" plugin.

Namespace

Drupal\ckeditor\Plugin\CKEditorPlugin

Code

public function getButtons() {
  $path = $this->getModulePath('ckeditor') . '/js/plugins/drupallink';
  return [
    'DrupalLink' => [
      'label' => $this->t('Link'),
      'image' => $path . '/icons/drupallink.png',
    ],
    'DrupalUnlink' => [
      'label' => $this->t('Unlink'),
      'image' => $path . '/icons/drupalunlink.png',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.