You are here

protected function EmojioneCKEditorButton::getLibraryPath in CKEditor Emojione 8

Get the CKEditor Emojione library path.

Return value

string The library path with support for the Libraries API module.

2 calls to EmojioneCKEditorButton::getLibraryPath()
EmojioneCKEditorButton::getButtons in src/Plugin/CKEditorPlugin/EmojioneCKEditorButton.php
Returns the buttons that this plugin provides, along with metadata.
EmojioneCKEditorButton::getFile in src/Plugin/CKEditorPlugin/EmojioneCKEditorButton.php
Returns the Drupal root-relative file path to the plugin JavaScript file.

File

src/Plugin/CKEditorPlugin/EmojioneCKEditorButton.php, line 56

Class

EmojioneCKEditorButton
Defines the "emojione" plugin.

Namespace

Drupal\ckeditor_emojione\Plugin\CKEditorPlugin

Code

protected function getLibraryPath() {

  // Support for "Libraries API" module.
  if (\Drupal::moduleHandler()
    ->moduleExists('libraries')) {
    return \Drupal::service('library.libraries_directory_file_finder')
      ->find('emojione');
  }
  return 'libraries/emojione';
}