Skip navigation
Help

theme_file_managed_file

7 file.module theme_file_managed_file($variables)

Returns HTML for a managed file element.

Parameters

$variables: An associative array containing:

  • element: A render element representing the file.

Related topics

File

drupal/modules/file/file.module, line 643
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function theme_file_managed_file($variables) {
  $element = $variables['element'];

  // This wrapper is required to apply JS behaviors and CSS styling.
  $output = '';
  $output .= '<div class="form-managed-file">';
  $output .= drupal_render_children($element);
  $output .= '</div>';
  return $output;
}