You are here

protected function MediaLibraryUiBuilder::buildLibraryContent in Drupal 8

Same name and namespace in other branches
  1. 9 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 155

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