function thunder_media_preprocess_views_view in Thunder 6.1.x
Same name and namespace in other branches
- 8.5 modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
- 8.2 modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
- 8.3 modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
- 8.4 modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
- 6.2.x modules/thunder_media/thunder_media.module \thunder_media_preprocess_views_view()
- 6.0.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 48 - 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',
];
if (in_array($variables['view']
->id(), $thunder_media_browser)) {
$variables['view_array']['#attached']['library'][] = 'thunder_media/entity_browser_view';
}
}