protected function MediaLibraryUiBuilder::buildLibraryContent in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media_library/src/MediaLibraryUiBuilder.php \Drupal\media_library\MediaLibraryUiBuilder::buildLibraryContent()
- 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.
File
- core/modules/ media_library/ src/ MediaLibraryUiBuilder.php, line 151 
Class
- MediaLibraryUiBuilder
- Service which builds the media library.
Namespace
Drupal\media_libraryCode
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),
  ];
}