You are here

public function Btbutton::getLibraryPath in CKEditor Bootstrap Buttons 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/CKEditorPlugin/Btbutton.php \Drupal\ckeditor_bootstrap_buttons\Plugin\CKEditorPlugin\Btbutton::getLibraryPath()

Get path to library folder.

2 calls to Btbutton::getLibraryPath()
Btbutton::getButtons in src/Plugin/CKEditorPlugin/Btbutton.php
Returns the buttons that this plugin provides, along with metadata.
Btbutton::getFile in src/Plugin/CKEditorPlugin/Btbutton.php
Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile().

File

src/Plugin/CKEditorPlugin/Btbutton.php, line 22

Class

Btbutton
Defines the "btbutton" plugin.

Namespace

Drupal\ckeditor_bootstrap_buttons\Plugin\CKEditorPlugin

Code

public function getLibraryPath() {
  if (\Drupal::moduleHandler()
    ->moduleExists('libraries')) {
    return libraries_get_path('btbutton');
  }
  else {
    return 'libraries/btbutton';
  }
}