You are here

public function NodeViewController::view in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/src/Controller/NodeViewController.php \Drupal\node\Controller\NodeViewController::view()

Provides a page to render a single entity.

Parameters

\Drupal\Core\Entity\EntityInterface $_entity: The Entity to be rendered. Note this variable is named $_entity rather than $entity to prevent collisions with other named placeholders in the route.

string $view_mode: (optional) The view mode that should be used to display the entity. Defaults to 'full'.

Return value

array A render array as expected by \Drupal\Core\Render\RendererInterface::render().

Overrides EntityViewController::view

File

core/modules/node/src/Controller/NodeViewController.php, line 65

Class

NodeViewController
Defines a controller to render a single node.

Namespace

Drupal\node\Controller

Code

public function view(EntityInterface $node, $view_mode = 'full', $langcode = NULL) {
  return parent::view($node, $view_mode);
}