function MediaLibraryUiBuilder::buildLibraryContent

Same name in other branches
  1. 9 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::buildLibraryContent()
  2. 8.9.x core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::buildLibraryContent()
  3. 10 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::buildLibraryContent()

Build the media library content area.

Parameters

\Drupal\media_library\MediaLibraryState $state: The current state of the media library, derived from the current request.

Return value

array The render array for the media library.

1 call to MediaLibraryUiBuilder::buildLibraryContent()
MediaLibraryUiBuilder::buildUi in core/modules/media_library/src/MediaLibraryUiBuilder.php
Build the media library UI.

File

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

Class

MediaLibraryUiBuilder
Service which builds the media library.

Namespace

Drupal\media_library

Code

protected function buildLibraryContent(MediaLibraryState $state) {
    return [
        '#type' => 'container',
        '#theme_wrappers' => [
            'container__media_library_content',
        ],
        '#attributes' => [
            'id' => 'media-library-content',
        ],
        'form' => $this->buildMediaTypeAddForm($state),
        'view' => $this->buildMediaLibraryView($state),
    ];
}

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