You are here

function _webform_display_multifile in Webform Multiple File Upload 7

Same name and namespace in other branches
  1. 6 multifile.inc \_webform_display_multifile()

Implementation of _webform_display_component().

File

./multifile.inc, line 593
Webform module file component.

Code

function _webform_display_multifile($component, $value, $format = 'html') {
  $fids = isset($value[0]) ? drupal_json_decode($value[0]) : NULL;
  return array(
    '#title' => $component['name'],
    '#value' => $fids ? webform_get_multifile($fids) : NULL,
    '#weight' => $component['weight'],
    '#theme' => 'webform_display_multifile',
    '#theme_wrappers' => $format == 'html' ? array(
      'webform_element',
    ) : array(
      'webform_element_text',
    ),
    '#webform_component' => $component,
    '#format' => $format,
  );
}