You are here

public static function MediaLibraryUiBuilder::dialogOptions in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::dialogOptions()
  2. 10 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/media_library/src/Plugin/CKEditorPlugin/DrupalMediaLibrary.php
Returns the additions to CKEDITOR.config for a specific CKEditor instance.
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 94

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%',
  ];
}