public function NodeController::revisionShow in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Controller/NodeController.php \Drupal\node\Controller\NodeController::revisionShow()
Displays a node revision.
Parameters
int $node_revision: The node revision ID.
Return value
array An array suitable for drupal_render().
1 string reference to 'NodeController::revisionShow'
- node.routing.yml in core/
modules/ node/ node.routing.yml - core/modules/node/node.routing.yml
File
- core/
modules/ node/ src/ Controller/ NodeController.php, line 132 - Contains \Drupal\node\Controller\NodeController.
Class
- NodeController
- Returns responses for Node routes.
Namespace
Drupal\node\ControllerCode
public function revisionShow($node_revision) {
$node = $this
->entityManager()
->getStorage('node')
->loadRevision($node_revision);
$node_view_controller = new NodeViewController($this->entityManager, $this->renderer);
$page = $node_view_controller
->view($node);
unset($page['nodes'][$node
->id()]['#cache']);
return $page;
}