You are here

public function EventController::revisionPageTitle in Event 8

Page title callback for a Event revision.

Parameters

int $event_revision: The Event revision ID.

Return value

string The page title.

File

src/Controller/EventController.php, line 46

Class

EventController
Class EventController.

Namespace

Drupal\event\Controller

Code

public function revisionPageTitle($event_revision) {
  $event = EntityTypeManager::getStorage('event')
    ->loadRevision($event_revision);
  return $this
    ->t('Revision of %title from %date', [
    '%title' => $event
      ->label(),
    '%date' => \Drupal::service('date.formatter')
      ->format($event
      ->getRevisionCreationTime()),
  ]);
}