You are here

class DetailPlugin in CKeditor Details Accordion 8

Same name and namespace in other branches
  1. 2.x src/Plugin/CKEditorPlugin/DetailPlugin.php \Drupal\ckeditor_details\Plugin\CKEditorPlugin\DetailPlugin

Defines the "detail" plugin.

Plugin annotation


@CKEditorPlugin(
  id = "detail",
  label = @Translation("Accordion")
)

Hierarchy

Expanded class hierarchy of DetailPlugin

File

src/Plugin/CKEditorPlugin/DetailPlugin.php, line 18

Namespace

Drupal\ckeditor_details\Plugin\CKEditorPlugin
View source
class DetailPlugin extends PluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface {

  /**
   * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getDependencies().
   */
  public function getDependencies(Editor $editor) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getLibraries(Editor $editor) {
    return [
      'core/drupal.jquery',
    ];
  }

  /**
   * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::isInternal().
   */
  public function isInternal() {
    return FALSE;
  }

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

  /**
   * {@inheritdoc}
   */
  public function getButtons() {
    return [
      'detail' => [
        'label' => t('Add accordion'),
        'image' => drupal_get_path('module', 'ckeditor_details') . '/js/plugins/detail/icons/detail.png',
      ],
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function getFile() {
    return drupal_get_path('module', 'ckeditor_details') . '/js/plugins/detail/plugin.js';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DetailPlugin::getButtons public function Returns the buttons that this plugin provides, along with metadata. Overrides CKEditorPluginButtonsInterface::getButtons
DetailPlugin::getConfig public function Returns the additions to CKEDITOR.config for a specific CKEditor instance. Overrides CKEditorPluginInterface::getConfig
DetailPlugin::getDependencies public function Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getDependencies(). Overrides CKEditorPluginInterface::getDependencies
DetailPlugin::getFile public function Returns the Drupal root-relative file path to the plugin JavaScript file. Overrides CKEditorPluginInterface::getFile
DetailPlugin::getLibraries public function Returns a list of libraries this plugin requires. Overrides CKEditorPluginInterface::getLibraries
DetailPlugin::isInternal public function Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::isInternal(). Overrides CKEditorPluginInterface::isInternal
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 92