public function SitewideAlertController::revisionShow in Sitewide Alert 8
Displays a Sitewide Alert revision.
Parameters
int $sitewide_alert_revision: The Sitewide Alert revision ID.
Return value
array An array suitable for drupal_render().
File
- src/
Controller/ SitewideAlertController.php, line 69
Class
- SitewideAlertController
- Class SitewideAlertController.
Namespace
Drupal\sitewide_alert\ControllerCode
public function revisionShow($sitewide_alert_revision) {
$sitewide_alert = $this
->entityTypeManager()
->getStorage('sitewide_alert')
->loadRevision($sitewide_alert_revision);
$view_builder = $this
->entityTypeManager()
->getViewBuilder('sitewide_alert');
return $view_builder
->view($sitewide_alert);
}