You are here

function _webform_render_markup in Webform 7.3

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.4 components/markup.inc \_webform_render_markup()

Implements _webform_render_component().

File

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

Code

function _webform_render_markup($component, $value = NULL, $filter = TRUE) {
  $node = isset($component['nid']) ? node_load($component['nid']) : NULL;
  $element = array(
    '#type' => 'markup',
    '#title' => $filter ? NULL : $component['name'],
    '#weight' => $component['weight'],
    '#markup' => $filter ? _webform_filter_values(check_markup($component['value'], $component['extra']['format'], '', TRUE), $node, NULL, NULL, FALSE) : $component['value'],
    '#format' => $component['extra']['format'],
    '#theme_wrappers' => array(
      'webform_element',
    ),
    '#translatable' => array(
      'title',
      'markup',
    ),
  );
  return $element;
}