function node_view

Generates an array for rendering the given node.

Parameters

Drupal\node\Node $node: A node entity.

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

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

Return value

An array as expected by drupal_render().

14 calls to node_view()

File

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

Code

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