You are here

public function HeartbeatStreamController::revisionPageTitle in Heartbeat 8

Page title callback for a Heartbeat stream revision.

Parameters

int $heartbeat_stream_revision: The Heartbeat stream revision ID.

Return value

string The page title.

File

src/Controller/HeartbeatStreamController.php, line 133

Class

HeartbeatStreamController
Class HeartbeatStreamController.

Namespace

Drupal\heartbeat\Controller

Code

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