<?php

namespace Drupal\{{ machine_name }}\Plugin\CKEditorPlugin;

use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\editor\Entity\Editor;

/**
 * Defines the "{{ plugin_label }}" plugin.
 *
 * @CKEditorPlugin(
 *   id = "{{ plugin_id }}",
 *   label = @Translation("{{ plugin_label }}"),
 *   module = "{{ machine_name }}"
 * )
 */
class {{ class }} extends CKEditorPluginBase {

  /**
   * {@inheritdoc}
   */
  public function getFile() {
    return $this->getModulePath('{{ machine_name }}') . '/js/plugins/example/plugin.js';
  }

  /**
   * {@inheritdoc}
   */
  public function getConfig(Editor $editor) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getButtons() {
    return [
      '{{ short_plugin_id }}' => [
        'label' => $this->t('{{ plugin_label }}'),
        'image' => $this->getModulePath('{{ machine_name }}') . '/js/plugins/example/icons/example.png',
      ],
    ];
  }

}
