1 node.module node_view(Node $node, $view_mode = 'full', $langcode = NULL)

Generates an array for rendering the given node.

Parameters

Node $node: A node entity.

$view_mode: (optional) Display mode, e.g. 'full' or 'teaser'. Defaults to 'full'.

$langcode: (optional) A language code to use for rendering. Defaults to the global content language of the current request.

Return value

An array as expected by backdrop_render().:

File

core/modules/node/node.module, line 1116
The core module that allows content to be submitted to the site.

Code

function node_view(Node $node, $view_mode = 'full', $langcode = NULL) {
  return $node->view($view_mode, $langcode);
}