function UnicornEditor::validateImageUploadSettings
Same name in other branches
- 9 core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php \Drupal\editor_test\Plugin\Editor\UnicornEditor::validateImageUploadSettings()
- 11.x core/modules/editor/tests/modules/editor_test/src/Plugin/Editor/UnicornEditor.php \Drupal\editor_test\Plugin\Editor\UnicornEditor::validateImageUploadSettings()
#element_validate handler for "image_upload" in buildConfigurationForm().
Moves the text editor's image upload settings into $editor->image_upload.
See also
editor_image_upload_settings_form()
File
-
core/
modules/ editor/ tests/ modules/ editor_test/ src/ Plugin/ Editor/ UnicornEditor.php, line 56
Class
- UnicornEditor
- Defines a Unicorn-powered text editor for Drupal (for testing purposes).
Namespace
Drupal\editor_test\Plugin\EditorCode
public function validateImageUploadSettings(array $element, FormStateInterface $form_state) {
$settings =& $form_state->getValue([
'editor',
'settings',
'image_upload',
]);
$form_state->get('editor')
->setImageUploadSettings($settings);
$form_state->unsetValue([
'editor',
'settings',
'image_upload',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.