You are here

public function HeartbeatController::revisionPageTitle in Heartbeat 8

Page title callback for a Heartbeat revision.

Parameters

int $heartbeat_revision: The Heartbeat revision ID.

Return value

string The page title.

File

src/Controller/HeartbeatController.php, line 78

Class

HeartbeatController
Class HeartbeatController.

Namespace

Drupal\heartbeat\Controller

Code

public function revisionPageTitle($heartbeat_revision) {
  $heartbeat = $this
    ->entityManager()
    ->getStorage('heartbeat')
    ->loadRevision($heartbeat_revision);
  return $this
    ->t('Revision of %title from %date', array(
    '%title' => $heartbeat
      ->label(),
    '%date' => format_date($heartbeat
      ->getRevisionCreationTime()),
  ));
}