function ClaroHooks::preprocessMediaLibraryItemWidget
Same name and namespace in other branches
- 11.x core/themes/claro/src/Hook/ClaroHooks.php \Drupal\claro\Hook\ClaroHooks::preprocessMediaLibraryItemWidget()
Implements hook_preprocess_HOOK() for media_library_item__widget.
This targets each media item selected in an entity reference field.
Attributes
#[Hook('preprocess_media_library_item__widget')]
File
-
core/
themes/ claro/ src/ Hook/ ClaroHooks.php, line 1271
Class
- ClaroHooks
- Hook implementations for claro.
Namespace
Drupal\claro\HookCode
public function preprocessMediaLibraryItemWidget(array &$variables) : void {
$variables['content']['remove_button']['#attributes']['class'][] = 'media-library-item__remove';
$variables['content']['remove_button']['#attributes']['class'][] = 'icon-link';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.