You are here

private function CkeditorTemplates::getTemplatesPluginPath in CKEditor Templates 8

Return ckeditor templates plugin path relative to drupal root.

Return value

string Relative path to the ckeditor plugin folder

3 calls to CkeditorTemplates::getTemplatesPluginPath()
CkeditorTemplates::getButtons in src/Plugin/CKEditorPlugin/CkeditorTemplates.php
Returns the buttons that this plugin provides, along with metadata.
CkeditorTemplates::getFile in src/Plugin/CKEditorPlugin/CkeditorTemplates.php
Returns the Drupal root-relative file path to the plugin JavaScript file.
CkeditorTemplates::getTemplatesDefaultPath in src/Plugin/CKEditorPlugin/CkeditorTemplates.php
Generate the path to the template file.

File

src/Plugin/CKEditorPlugin/CkeditorTemplates.php, line 145

Class

CkeditorTemplates
Defines the "Templates" plugin.

Namespace

Drupal\ckeditor_templates\Plugin\CKEditorPlugin

Code

private function getTemplatesPluginPath() {
  $pluginPath = 'libraries/ckeditor/plugins/templates';
  if (!file_exists(DRUPAL_ROOT . '/' . $pluginPath)) {

    // keep supporting module legacy path to avoid breaking change
    // using this path is deprecated
    $pluginPath = 'libraries/templates';
  }
  return $pluginPath;
}