function ClaroHooks::preprocessMediaLibraryItemSmall

Same name and namespace in other branches
  1. main core/themes/claro/src/Hook/ClaroHooks.php \Drupal\claro\Hook\ClaroHooks::preprocessMediaLibraryItemSmall()

Implements hook_preprocess_HOOK() for 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/claro/src/Hook/ClaroHooks.php, line 1283

Class

ClaroHooks
Hook implementations for claro.

Namespace

Drupal\claro\Hook

Code

public function preprocessMediaLibraryItemSmall(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.