class EditorDialogSave in Drupal 10
Same name and namespace in other branches
- 8 core/modules/editor/src/Ajax/EditorDialogSave.php \Drupal\editor\Ajax\EditorDialogSave
- 9 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 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
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 string
*/
protected $values;
/**
* Constructs an EditorDialogSave object.
*
* @param string $values
* The values that should be passed to the form constructor in Drupal.
*/
public function __construct($values) {
$this->values = $values;
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'editorDialogSave',
'values' => $this->values,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EditorDialogSave:: |
protected | property | An array of values that will be passed back to the editor by the dialog. | |
EditorDialogSave:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
EditorDialogSave:: |
public | function | Constructs an EditorDialogSave object. |