function DrupalMediaLibrary::getButtons

Same name in other branches
  1. 9 core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalMediaLibrary.php \Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalMediaLibrary::getButtons()

Overrides CKEditorPluginButtonsInterface::getButtons

File

core/modules/media_library/src/Plugin/CKEditorPlugin/DrupalMediaLibrary.php, line 161

Class

DrupalMediaLibrary
Defines the "drupalmedialibrary" plugin.

Namespace

Drupal\media_library\Plugin\CKEditorPlugin

Code

public function getButtons() {
    return [
        'DrupalMediaLibrary' => [
            'label' => $this->t('Insert from Media Library'),
            'image' => $this->moduleExtensionList
                ->getPath('media_library') . '/js/plugins/drupalmedialibrary/icons/drupalmedialibrary.png',
        ],
    ];
}

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