public function BUEditorEditor::getJS in BUEditor 8.2
Same name and namespace in other branches
- 8 src/Entity/BUEditorEditor.php \Drupal\bueditor\Entity\BUEditorEditor::getJS()
Returns JS data including settings and libraries.
2 calls to BUEditorEditor::getJS()
- BUEditorEditor::getJSSettings in src/
Entity/ BUEditorEditor.php - Returns JS settings.
- BUEditorEditor::getLibraries in src/
Entity/ BUEditorEditor.php - Returns JS libraries.
File
- src/
Entity/ BUEditorEditor.php, line 130
Class
- BUEditorEditor
- Defines the BUEditor Editor entity.
Namespace
Drupal\bueditor\EntityCode
public function getJS(Editor $editor = NULL) {
if (!isset($this->js)) {
$this->js = [
'libraries' => [
'bueditor/drupal.bueditor',
],
'settings' => array_filter($this
->getSettings()) + [
'toolbar' => [],
],
];
\Drupal::service('plugin.manager.bueditor.plugin')
->alterEditorJS($this->js, $this, $editor);
}
return $this->js;
}