You are here

public function BUEditor::settingsFormValidate in BUEditor 8

File

src/Plugin/Editor/BUEditor.php, line 88

Class

BUEditor
Defines BUEditor as an Editor plugin.

Namespace

Drupal\bueditor\Plugin\Editor

Code

public function settingsFormValidate(array $form, FormStateInterface $form_state) {
  $settings =& $form_state
    ->getValue([
    'editor',
    'settings',
  ]);

  // Remove empty role editor pairs.
  if (isset($settings['roles_editors'])) {
    $settings['roles_editors'] = array_filter($settings['roles_editors']);
  }
}