You are here

public static function MediaLibraryUiBuilder::dialogOptions in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::dialogOptions()
  2. 9 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::dialogOptions()

Get media library dialog options.

Return value

array The media library dialog options.

2 calls to MediaLibraryUiBuilder::dialogOptions()
DrupalMediaLibrary::getConfig in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalMediaLibrary.php
MediaLibraryWidget::openMediaLibrary in core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php
AJAX callback to open the library modal.

File

core/modules/media_library/src/MediaLibraryUiBuilder.php, line 90

Class

MediaLibraryUiBuilder
Service which builds the media library.

Namespace

Drupal\media_library

Code

public static function dialogOptions() {
  return [
    'dialogClass' => 'media-library-widget-modal',
    'title' => t('Add or select media'),
    'height' => '75%',
    'width' => '75%',
  ];
}