You are here

function thunder_media_preprocess_views_view in Thunder 8.4

Same name and namespace in other branches
  1. 8.5 modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
  2. 8.2 modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
  3. 8.3 modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
  4. 6.2.x modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
  5. 6.0.x modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
  6. 6.1.x modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()

Implements hook_preprocess_views_view().

File

modules/thunder_media/thunder_media.module, line 36
Contains media related functions.

Code

function thunder_media_preprocess_views_view(&$variables) {
  $thunder_media_browser = [
    'entity_browser',
    // TODO: Legacy support, remove it with new major version.
    'image_browser',
    'video_browser',
    'riddle_browser',
  ];
  if (in_array($variables['view']
    ->id(), $thunder_media_browser)) {
    $variables['view_array']['#attached']['library'][] = 'thunder_media/entity_browser_view';
  }
}