class EditorDialogSave
Same name in other branches
- 9 core/modules/editor/src/Ajax/EditorDialogSave.php \Drupal\editor\Ajax\EditorDialogSave
- 8.9.x core/modules/editor/src/Ajax/EditorDialogSave.php \Drupal\editor\Ajax\EditorDialogSave
- 11.x core/modules/editor/src/Ajax/EditorDialogSave.php \Drupal\editor\Ajax\EditorDialogSave
Provides an AJAX command for saving the contents of an editor dialog.
This command is implemented in editor.dialog.js in Drupal.AjaxCommands.prototype.editorDialogSave.
Hierarchy
- class \Drupal\editor\Ajax\EditorDialogSave implements \Drupal\Core\Ajax\CommandInterface
Expanded class hierarchy of EditorDialogSave
4 files declare their use of EditorDialogSave
- EditorImageDialog.php in core/
modules/ editor/ src/ Form/ EditorImageDialog.php - EditorLinkDialog.php in core/
modules/ editor/ src/ Form/ EditorLinkDialog.php - EditorMediaDialog.php in core/
modules/ media/ src/ Form/ EditorMediaDialog.php - MediaLibraryEditorOpener.php in core/
modules/ media_library/ src/ MediaLibraryEditorOpener.php
1 string reference to 'EditorDialogSave'
- EditorDialogSave::render in core/
modules/ editor/ src/ Ajax/ EditorDialogSave.php - Return an array to be run through json_encode and sent to the client.
File
-
core/
modules/ editor/ src/ Ajax/ EditorDialogSave.php, line 13
Namespace
Drupal\editor\AjaxView source
class EditorDialogSave implements CommandInterface {
/**
* An array of values that will be passed back to the editor by the dialog.
*
* @var array
*/
protected array $values;
/**
* Constructs an EditorDialogSave object.
*
* @param array $values
* The values that should be passed to the form constructor in Drupal.
*/
public function __construct(array $values) {
$this->values = $values;
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'editorDialogSave',
'values' => $this->values,
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
EditorDialogSave::$values | protected | property | An array of values that will be passed back to the editor by the dialog. | |
EditorDialogSave::render | public | function | Return an array to be run through json_encode and sent to the client. | Overrides CommandInterface::render |
EditorDialogSave::__construct | public | function | Constructs an EditorDialogSave object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.