You are here

public function StylesCombo::validateStylesValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php \Drupal\ckeditor\Plugin\CKEditorPlugin\StylesCombo::validateStylesValue()

#element_validate handler for the "styles" element in settingsForm().

File

core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php, line 103
Contains \Drupal\ckeditor\Plugin\CKEditorPlugin\StylesCombo.

Class

StylesCombo
Defines the "stylescombo" plugin.

Namespace

Drupal\ckeditor\Plugin\CKEditorPlugin

Code

public function validateStylesValue(array $element, FormStateInterface $form_state) {
  if ($this
    ->generateStylesSetSetting($element['#value']) === FALSE) {
    $form_state
      ->setError($element, t('The provided list of styles is syntactically incorrect.'));
  }
}