function _webform_display_node in Webform Node Element 6
Same name and namespace in other branches
- 7 components/node.inc \_webform_display_node()
Implements _webform_display_component().
File
- components/
node.inc, line 145 - 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' => $content['body'] . $content['links'],
'#webform_component' => $component,
);
}