\Drupal\editor\Ajax\EditorDialogSave::__construct() should typehint as an array instead of a string

Created on 2 December 2019, over 5 years ago
Updated 25 January 2024, about 1 year ago

Problem/Motivation

All the usages for new EditorDialogSave($values) is passing in $form_state->getValues(), but the phpdoc for the __construct() method and the $values property says it should be a string. That appears to be incorrect and it should typehint as an array.

  /**
   * An array of values that will be passed back to the editor by the dialog.
   *
   * @var string // But this just said above it would be an array???
   */
  protected $values;
Method
    __construct
Found usages  (2 usages found)
        web\core\modules\editor\src\Form  (2 usages found)
            EditorImageDialog.php  (1 usage found)
                EditorImageDialog  (1 usage found)
                    submitForm  (1 usage found)
                        232 $response->addCommand(new EditorDialogSave($form_state->getValues()));
            EditorLinkDialog.php  (1 usage found)
               EditorLinkDialog  (1 usage found)
                    submitForm  (1 usage found)
                        85 $response->addCommand(new EditorDialogSave($form_state->getValues()));

Steps to reproduce

Proposed resolution

EditorDialogSave should typehint as an array

Remaining tasks

Review

User interface changes

NA

API changes

Add typehint to EditorDialogSave

Data model changes

NA

Release notes snippet

NA

πŸ› Bug report
Status

Fixed

Version

11.0 πŸ”₯

Component
EditorΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΊπŸ‡ΈUnited States dave reid Nebraska USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024