public function NodeViewController::view in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/src/Controller/NodeViewController.php \Drupal\node\Controller\NodeViewController::view()
- 9 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\ControllerCode
public function view(EntityInterface $node, $view_mode = 'full', $langcode = NULL) {
return parent::view($node, $view_mode);
}