You are here

PageBreak.php in CKEditor PageBreak 8

File

src/Plugin/CKEditorPlugin/PageBreak.php
View source
<?php

namespace Drupal\pagebreak\Plugin\CKEditorPlugin;

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

/**
 * Defines the "pagebreak" plugin.
 *
 * @CKEditorPlugin(
 *   id = "pagebreak",
 *   label = @Translation("PageBreak"),
 * )
 */
class PageBreak extends CKEditorPluginBase {

  /**
   * {@inheritdoc}
   */
  public function getFile() {
    return 'libraries/pagebreak/plugin.js';
  }

  /**
   * {@inheritdoc}
   */
  public function getDependencies(Editor $editor) {
    return [
      'fakeobjects',
    ];
  }

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

  /**
   * {@inheritdoc}
   */
  public function getButtons() {
    return [
      'PageBreak' => [
        'label' => $this
          ->t('PageBreak'),
        'image' => 'libraries/pagebreak/icons/pagebreak.png',
      ],
    ];
  }

}

Classes

Namesort descending Description
PageBreak Defines the "pagebreak" plugin.