LlamaButton.php

Same filename and directory in other branches
  1. 9 core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaButton.php

Namespace

Drupal\ckeditor_test\Plugin\CKEditorPlugin

File

core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaButton.php

View source
<?php

namespace Drupal\ckeditor_test\Plugin\CKEditorPlugin;

use Drupal\ckeditor\CKEditorPluginButtonsInterface;

/**
 * Defines a "LlamaButton" plugin, with a toolbar builder-enabled "llama" feature.
 *
 * @CKEditorPlugin(
 *   id = "llama_button",
 *   label = @Translation("Llama Button")
 * )
 */
class LlamaButton extends Llama implements CKEditorPluginButtonsInterface {
  
  /**
   * {@inheritdoc}
   */
  public function getButtons() {
    return [
      'Llama' => [
        'label' => t('Insert Llama'),
      ],
    ];
  }
  
  /**
   * {@inheritdoc}
   */
  public function getFile() {
    return drupal_get_path('module', 'ckeditor_test') . '/js/llama_button.js';
  }

}

Classes

Title Deprecated Summary
LlamaButton Defines a "LlamaButton" plugin, with a toolbar builder-enabled "llama" feature.

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