You are here

CKEditorBSGrid.php in CKEditor Bootstrap Grid 8.2

Same filename and directory in other branches
  1. 8 src/Plugin/CKEditorPlugin/CKEditorBSGrid.php

File

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

namespace Drupal\ckeditor_bs_grid\Plugin\CKEditorPlugin;

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

/**
 * Defines the "bs_grid" plugin.
 *
 * @CKEditorPlugin(
 *   id = "bs_grid",
 *   label = @Translation("Bootstrap Grid")
 * )
 */
class CKEditorBSGrid extends CKEditorPluginBase {

  /**
   * {@inheritdoc}
   */
  public function getButtons() {
    $path = drupal_get_path('module', 'ckeditor_bs_grid') . '/js/bs_grid';
    return [
      'bs_grid' => [
        'label' => t('Bootstrap Grid'),
        'image' => $path . '/icons/bs_grid.png',
      ],
    ];
  }

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

  /**
   * {@inheritdoc}
   */
  public function isInternal() {
    return FALSE;
  }

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

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

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

}

Classes

Namesort descending Description
CKEditorBSGrid Defines the "bs_grid" plugin.