You are here

function claro_preprocess_file_managed_file in Drupal 10

Same name and namespace in other branches
  1. 8 core/themes/claro/claro.theme \claro_preprocess_file_managed_file()
  2. 9 core/themes/claro/claro.theme \claro_preprocess_file_managed_file()

Implements hook_preprocess_HOOK() for file_managed_file.

File

core/themes/claro/claro.theme, line 1165
Functions to support theming in the Claro theme.

Code

function claro_preprocess_file_managed_file(&$variables) {

  // Produce the same renderable element structure as image widget has.
  $child_keys = Element::children($variables['element']);
  foreach ($child_keys as $child_key) {
    $variables['data'][$child_key] = $variables['element'][$child_key];
  }
  _claro_preprocess_file_and_image_widget($variables);
}