public function SimpleMegaMenuController::revisionShow in Simple Mega Menu 8
Same name and namespace in other branches
- 2.0.x src/Controller/SimpleMegaMenuController.php \Drupal\simple_megamenu\Controller\SimpleMegaMenuController::revisionShow()
Displays a Simple mega menu revision.
Parameters
int $simple_mega_menu_revision: The Simple mega menu revision ID.
Return value
array An array suitable for drupal_render().
File
- src/
Controller/ SimpleMegaMenuController.php, line 71
Class
- SimpleMegaMenuController
- Class SimpleMegaMenuController.
Namespace
Drupal\simple_megamenu\ControllerCode
public function revisionShow($simple_mega_menu_revision) {
$simple_mega_menu = $this
->entityTypeManager()
->getStorage('simple_mega_menu')
->loadRevision($simple_mega_menu_revision);
$view_builder = $this
->entityTypeManager()
->getViewBuilder('simple_mega_menu');
return $view_builder
->view($simple_mega_menu);
}