public function MediaLibraryOpenerInterface::getSelectionResponse in Drupal 9
Same name and namespace in other branches
- 8 core/modules/media_library/src/MediaLibraryOpenerInterface.php \Drupal\media_library\MediaLibraryOpenerInterface::getSelectionResponse()
Generates a response after selecting media items in the media library.
Parameters
\Drupal\media_library\MediaLibraryState $state: The state the media library was in at the time of selection, allowing the response to be customized based on that state.
int[] $selected_ids: The IDs of the selected media items.
Return value
\Drupal\Core\Ajax\AjaxResponse The response to update the page after selecting media.
2 methods override MediaLibraryOpenerInterface::getSelectionResponse()
- MediaLibraryEditorOpener::getSelectionResponse in core/
modules/ media_library/ src/ MediaLibraryEditorOpener.php - Generates a response after selecting media items in the media library.
- MediaLibraryFieldWidgetOpener::getSelectionResponse in core/
modules/ media_library/ src/ MediaLibraryFieldWidgetOpener.php - Generates a response after selecting media items in the media library.
File
- core/
modules/ media_library/ src/ MediaLibraryOpenerInterface.php, line 51
Class
- MediaLibraryOpenerInterface
- Defines an interface for media library openers.
Namespace
Drupal\media_libraryCode
public function getSelectionResponse(MediaLibraryState $state, array $selected_ids);