You are here

function _webform_render_markup in Webform 7.4

Same name and namespace in other branches
  1. 5.2 components/markup.inc \_webform_render_markup()
  2. 5 components/markup.inc \_webform_render_markup()
  3. 6.3 components/markup.inc \_webform_render_markup()
  4. 6.2 components/markup.inc \_webform_render_markup()
  5. 7.3 components/markup.inc \_webform_render_markup()

Implements _webform_render_component().

File

components/markup.inc, line 82
Webform module markup component.

Code

function _webform_render_markup($component, $value = NULL, $filter = TRUE, $submission = NULL) {
  $element = array(
    '#type' => 'markup',
    '#title' => $filter ? NULL : $component['name'],
    '#weight' => $component['weight'],
    '#markup' => $component['value'],
    '#format' => $component['extra']['format'],
    '#theme_wrappers' => array(
      'webform_element',
    ),
    '#translatable' => array(
      'title',
      'markup',
    ),
    '#access' => $component['extra']['display_on'] != 'display',
    '#webform_nid' => isset($component['nid']) ? $component['nid'] : NULL,
    '#webform_submission' => $submission,
    '#webform_format' => $component['extra']['format'],
  );
  if ($filter) {
    $element['#after_build'] = array(
      '_webform_render_markup_after_build',
    );
  }
  return $element;
}