function node_view in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/node.module \node_view()
Generates an array for rendering the given node.
Parameters
\Drupal\node\NodeInterface $node: A node entity.
$view_mode: (optional) View mode, e.g., 'full', 'teaser', etc. 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
array An array as expected by drupal_render().
5 calls to node_view()
- ImageFieldAttributesTest::testNodeTeaser in core/
modules/ rdf/ src/ Tests/ ImageFieldAttributesTest.php - Tests that image fields in teasers have correct resources.
- ManageDisplayTest::assertNodeViewTextHelper in core/
modules/ field_ui/ src/ Tests/ ManageDisplayTest.php - Asserts that a string is (not) found in the rendered nodein a view mode.
- Rss::render in core/
modules/ node/ src/ Plugin/ views/ row/ Rss.php - Render a row object. This usually passes through to a theme template of some form, but not always.
- TwigDebugMarkupTest::testTwigDebugMarkup in core/
modules/ system/ src/ Tests/ Theme/ TwigDebugMarkupTest.php - Tests debug markup added to Twig template output.
- UnpublishByKeywordNode::execute in core/
modules/ node/ src/ Plugin/ Action/ UnpublishByKeywordNode.php - Executes the plugin.
7 string references to 'node_view'
- CommentRssTest::testCommentRss in core/
modules/ comment/ src/ Tests/ CommentRssTest.php - Tests comments as part of an RSS feed.
- FrontPageTest::doTestFrontPageViewCacheTags in core/
modules/ node/ src/ Tests/ Views/ FrontPageTest.php - Tests the cache tags on the front page.
- PageCacheTagsIntegrationTest::testPageCacheTags in core/
modules/ page_cache/ src/ Tests/ PageCacheTagsIntegrationTest.php - Test that cache tags are properly bubbled up to the page level.
- SearchPageCacheTagsTest::testSearchTagsBubbling in core/
modules/ search/ src/ Tests/ SearchPageCacheTagsTest.php - Tests the presence of expected cache tags with referenced entities.
- UrlTest::setUp in core/
tests/ Drupal/ Tests/ Core/ UrlTest.php
File
- core/
modules/ node/ node.module, line 783 - The core module that allows content to be submitted to the site.
Code
function node_view(NodeInterface $node, $view_mode = 'full', $langcode = NULL) {
return entity_view($node, $view_mode, $langcode);
}