template_preprocess_file_managed_file(&$variables)
Prepares variables for file form widget templates.
Default template: file-managed-file.html.twig.
array $variables: An associative array containing:
function template_preprocess_file_managed_file(&$variables) { $element = $variables['element']; $variables['attributes'] = array(); if (isset($element['#id'])) { $variables['attributes']['id'] = $element['#id']; } if (!empty($element['#attributes']['class'])) { $variables['attributes']['class'] = (array) $element['#attributes']['class']; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!file!file.module/function/template_preprocess_file_managed_file/8.1.x