function PreprocessHooks::mediaLibraryItemSmall
Same name and namespace in other branches
- main core/themes/admin/src/Hook/PreprocessHooks.php \Drupal\admin\Hook\PreprocessHooks::mediaLibraryItemSmall()
Implements hook_preprocess_media_library_item__small().
This targets each pre-selected media item selected when adding new media in the modal media library dialog.
Attributes
#[Hook('preprocess_media_library_item__small')]
File
-
core/
themes/ admin/ src/ Hook/ PreprocessHooks.php, line 867
Class
- PreprocessHooks
- Provides preprocess implementations.
Namespace
Drupal\admin\HookCode
public function mediaLibraryItemSmall(array &$variables) : void {
$variables['content']['select']['#attributes']['class'][] = 'media-library-item__click-to-select-checkbox';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.