You are here

public function UpdateSelectionCommand::render in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media_library/src/Ajax/UpdateSelectionCommand.php \Drupal\media_library\Ajax\UpdateSelectionCommand::render()
  2. 10 core/modules/media_library/src/Ajax/UpdateSelectionCommand.php \Drupal\media_library\Ajax\UpdateSelectionCommand::render()

Return an array to be run through json_encode and sent to the client.

Overrides CommandInterface::render

File

core/modules/media_library/src/Ajax/UpdateSelectionCommand.php, line 46

Class

UpdateSelectionCommand
AJAX command for adding media items to the media library selection.

Namespace

Drupal\media_library\Ajax

Code

public function render() {
  return [
    'command' => 'updateMediaLibrarySelection',
    'mediaIds' => $this->mediaIds,
  ];
}