
| Current Path : /var/www/html/rocksensor3/web/modules/contrib/panelbutton/src/Plugin/CKEditorPlugin/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor3/web/modules/contrib/panelbutton/src/Plugin/CKEditorPlugin/PanelButton.php |
<?php
namespace Drupal\panelbutton\Plugin\CKEditorPlugin;
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\editor\Entity\Editor;
/**
* Defines the "panelbutton" plugin.
*
* @CKEditorPlugin(
* id = "panelbutton",
* label = @Translation("CKEditor Panel Button"),
* )
*/
class PanelButton extends CKEditorPluginBase {
/**
* {@inheritdoc}
*/
public function getFile() {
// @todo Remove backward compatibility conditions when we bump Drupal
// requirement to 8.9.0. See https://www.drupal.org/node/3099614
if (\Drupal::hasService('library.libraries_directory_file_finder')) {
/** @var \Drupal\Core\Asset\LibrariesDirectoryFileFinder $library_file_finder */
$path = \Drupal::service('library.libraries_directory_file_finder')->find('panelbutton/plugin.js');
}
elseif (\Drupal::moduleHandler()->moduleExists('libraries')) {
$path = libraries_get_path('panelbutton') . '/plugin.js';
}
else {
$path = 'libraries/panelbutton/plugin.js';
}
return $path;
}
/**
* {@inheritdoc}
*/
public function getConfig(Editor $editor) {
return [];
}
/**
* {@inheritdoc}
*/
public function getButtons() {
return [];
}
}