function MediaLibraryUiBuilder::dialogOptions

Same name in other branches
  1. 9 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::dialogOptions()
  2. 8.9.x core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::dialogOptions()
  3. 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.

1 call to MediaLibraryUiBuilder::dialogOptions()
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 [
        'classes' => [
            'ui-dialog' => 'media-library-widget-modal',
        ],
        'title' => t('Add or select media'),
        'height' => '75%',
        'width' => '75%',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.