class MediaLibraryEditorOpener implements MediaLibraryOpenerInterface (View source)

internal  This service is an internal part of Media Library's CKEditor integration.
 

The media library opener for text editors.

Properties

protected ConfigEntityStorageInterface $filterStorage

The text format entity storage.

protected ContentEntityStorageInterface $mediaStorage

The media storage.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager)

The MediaLibraryEditorOpener constructor.

checkAccess(MediaLibraryState $state, AccountInterface $account)

Checks media library access.

getSelectionResponse(MediaLibraryState $state, array $selected_ids)

Generates a response after selecting media items in the media library.

Details

__construct(EntityTypeManagerInterface $entity_type_manager)

The MediaLibraryEditorOpener constructor.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity type manager.

AccessResultInterface checkAccess(MediaLibraryState $state, AccountInterface $account)

Checks media library access.

Parameters

MediaLibraryState $state

The media library.

AccountInterface $account

The user for which to check access.

Return Value

AccessResultInterface

The access result.

AjaxResponse getSelectionResponse(MediaLibraryState $state, array $selected_ids)

Generates a response after selecting media items in the media library.

Parameters

MediaLibraryState $state

The state the media library was in at the time of selection, allowing the response to be customized based on that state.

array $selected_ids

The IDs of the selected media items.

Return Value

AjaxResponse

The response to update the page after selecting media.