3 namespace Drupal\editor\Ajax;
5 use Drupal\Core\Ajax\CommandInterface;
8 * Provides an AJAX command for saving the contents of an editor dialog.
10 * This command is implemented in editor.dialog.js in
11 * Drupal.AjaxCommands.prototype.editorDialogSave.
13 class EditorDialogSave implements CommandInterface {
16 * An array of values that will be passed back to the editor by the dialog.
23 * Constructs a EditorDialogSave object.
25 * @param string $values
26 * The values that should be passed to the form constructor in Drupal.
28 public function __construct($values) {
29 $this->values = $values;
35 public function render() {
37 'command' => 'editorDialogSave',
38 'values' => $this->values,