function MediaLibraryThemeHooks::preprocessMediaLibraryWrapper

Prepares variables for the media library modal dialog.

Default template: media-library-wrapper.html.twig.

Parameters

array $variables: An associative array containing:

  • element: An associative array containing the properties of the element. Properties used: #menu, #content.

File

core/modules/media_library/src/Hook/MediaLibraryThemeHooks.php, line 44

Class

MediaLibraryThemeHooks
Hook implementations for media_library.

Namespace

Drupal\media_library\Hook

Code

public function preprocessMediaLibraryWrapper(array &$variables) : void {
  $variables['menu'] =& $variables['element']['menu'];
  $variables['content'] =& $variables['element']['content'];
}

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