function Image::validateConfigurationForm

Same name in other branches
  1. 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image::validateConfigurationForm()
  2. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image::validateConfigurationForm()

File

core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php, line 59

Class

Image
CKEditor 5 Image plugin.

Namespace

Drupal\ckeditor5\Plugin\CKEditor5Plugin

Code

public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
    $form_state->setValue('status', (bool) $form_state->getValue('status'));
    $form_state->setValue([
        'max_dimensions',
        'width',
    ], (int) $form_state->getValue([
        'max_dimensions',
        'width',
    ]));
    $form_state->setValue([
        'max_dimensions',
        'height',
    ], (int) $form_state->getValue([
        'max_dimensions',
        'height',
    ]));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.