You are here

class FileTools in CKEditor Upload Image 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/CKEditorPlugin/FileTools.php \Drupal\ckeditor_uploadimage\Plugin\CKEditorPlugin\FileTools

Defines the "templates" plugin.

Plugin annotation


@CKEditorPlugin(
  id = "filetools",
  label = @Translation("CKEditor File Tools"),
  module = "ckeditor_uploadimage"
)

Hierarchy

Expanded class hierarchy of FileTools

File

src/Plugin/CKEditorPlugin/FileTools.php, line 22
Contains \Drupal\ckeditor_uploadimage\Plugin\CKEditorPlugin\FileTools.

Namespace

Drupal\ckeditor_uploadimage\Plugin\CKEditorPlugin
View source
class FileTools extends PluginBase implements CKEditorPluginInterface {

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

  /**
   * {@inheritdoc}
   */
  function getFile() {
    $path = 'libraries/ckeditor/plugins/' . $this
      ->getPluginId() . '/plugin.js';
    if (file_exists('profiles/' . \Drupal::installProfile() . "/{$path}")) {
      return 'profiles/' . \Drupal::installProfile() . "/{$path}";
    }
    return $path;
  }

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

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
FileTools::getConfig public function Returns the additions to CKEDITOR.config for a specific CKEditor instance. Overrides CKEditorPluginInterface::getConfig
FileTools::getDependencies function Returns a list of plugins this plugin requires. Overrides CKEditorPluginInterface::getDependencies
FileTools::getFile function Returns the Drupal root-relative file path to the plugin JavaScript file. Overrides CKEditorPluginInterface::getFile
FileTools::getLibraries function Returns a list of libraries this plugin requires. Overrides CKEditorPluginInterface::getLibraries
FileTools::isInternal function Indicates if this plugin is part of the optimized CKEditor build. 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