function Language::getButtons

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

Overrides CKEditorPluginButtonsInterface::getButtons

File

core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php, line 83

Class

Language
Defines the "language" plugin.

Namespace

Drupal\ckeditor\Plugin\CKEditorPlugin

Code

public function getButtons() {
    $label = $this->t('Language');
    return [
        'Language' => [
            'label' => $label,
            'image_alternative' => [
                '#type' => 'inline_template',
                '#template' => '<a href="#" class="cke-icon-only" role="button" title="' . $label . '" aria-label="' . $label . '"><span class="cke_button_icon cke_button__language_icon">' . $label . '</span></a>',
            ],
        ],
    ];
}

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