function claro_preprocess_views_view_fields__media_library
Same name in other branches
- 9 core/themes/claro/claro.theme \claro_preprocess_views_view_fields__media_library()
- 8.9.x core/themes/claro/claro.theme \claro_preprocess_views_view_fields__media_library()
- 10 core/themes/claro/claro.theme \claro_preprocess_views_view_fields__media_library()
Implements hook_preprocess_views_view_fields().
This targets each rendered media item in the grid display of the media library's modal dialog.
File
-
core/
themes/ claro/ claro.theme, line 1481
Code
function claro_preprocess_views_view_fields__media_library(array &$variables) {
// Add classes to media rendered entity field so it can be targeted for
// styling. Adding this class in a template is very difficult to do.
if (isset($variables['fields']['rendered_entity']->wrapper_attributes)) {
$variables['fields']['rendered_entity']->wrapper_attributes
->addClass('media-library-item__click-to-select-trigger');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.