You are here

function _webform_display_node in Webform Node Element 7

Same name and namespace in other branches
  1. 6 components/node.inc \_webform_display_node()

Implements _webform_display_component().

File

components/node.inc, line 153
Webform module node component.

Code

function _webform_display_node($component, $value, $format = 'text') {
  $node = node_load($component['extra']['nid']);
  $content = node_view($node, $component['extra']['view_mode']);
  return array(
    '#title' => $component['name'],
    '#weight' => $component['weight'],
    '#theme' => 'webform_display_node',
    '#theme_wrappers' => array(
      'webform_display_node',
    ),
    '#format' => 'text',
    '#markup' => render($content),
    '#webform_component' => $component,
  );
}