1 node.module | node_show(Node $node, $message = FALSE) |
Page callback: Generates an array which displays a node detail page.
Parameters
Node $node: A node entity.
$message: (optional) A flag which sets a page title relevant to the revision being viewed.
Return value
A $page element suitable for use by backdrop_render().:
See also
File
- core/
modules/ node/ node.module, line 1171 - The core module that allows content to be submitted to the site.
Code
function node_show(Node $node, $message = FALSE) {
if ($message) {
backdrop_set_title(t('Revision of %title from %date', array('%title' => $node->title, '%date' => format_date($node->revision_timestamp))), PASS_THROUGH);
}
// For markup consistency with other pages, use node_view_multiple() rather than node_view().
$nodes = node_view_multiple(array($node->nid => $node), 'full');
// Update the history table, stating that this user viewed this node.
node_tag_new($node, TRUE);
backdrop_register_shutdown_function('node_tag_new');
return $nodes;
}