You are here

public function SitewideAlertController::revisionPageTitle in Sitewide Alert 8

Page title callback for a Sitewide Alert revision.

Parameters

int $sitewide_alert_revision: The Sitewide Alert revision ID.

Return value

string The page title.

File

src/Controller/SitewideAlertController.php, line 86

Class

SitewideAlertController
Class SitewideAlertController.

Namespace

Drupal\sitewide_alert\Controller

Code

public function revisionPageTitle($sitewide_alert_revision) {
  $sitewide_alert = $this
    ->entityTypeManager()
    ->getStorage('sitewide_alert')
    ->loadRevision($sitewide_alert_revision);
  return $this
    ->t('Revision of %title from %date', [
    '%title' => $sitewide_alert
      ->label(),
    '%date' => $this->dateFormatter
      ->format($sitewide_alert
      ->getRevisionCreationTime()),
  ]);
}