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()
book_node_export in drupal/core/modules/book/book.module
Generates printer-friendly HTML for a node.
comment_preview in drupal/core/modules/comment/comment.module
Generates a comment preview.
comment_reply in drupal/core/modules/comment/comment.pages.inc
Form constructor for the comment reply form.
hook_search_execute in drupal/core/modules/search/search.api.php
Execute a search for a set of key words.
hook_update_index in drupal/core/modules/search/search.api.php
Update the search index for this module.

... See full list

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);
}