You are here

public static function BUEditorEditorForm::getToolbarWidget in BUEditor 8

Same name and namespace in other branches
  1. 8.2 src/Form/BUEditorEditorForm.php \Drupal\bueditor\Form\BUEditorEditorForm::getToolbarWidget()

Returns toolbar widget data.

Return value

array

1 call to BUEditorEditorForm::getToolbarWidget()
BUEditorEditorForm::form in src/Form/BUEditorEditorForm.php
Gets the actual form array to be built.

File

src/Form/BUEditorEditorForm.php, line 183

Class

BUEditorEditorForm
Base form for BUEditor Editor entities.

Namespace

Drupal\bueditor\Form

Code

public static function getToolbarWidget() {
  $pm = \Drupal::service('plugin.manager.bueditor.plugin');
  $widget = [
    'items' => $pm
      ->getButtons(),
    'libraries' => [
      'bueditor/drupal.bueditor.admin',
    ],
  ];
  $pm
    ->alterToolbarWidget($widget);
  return $widget;
}