You are here

public function ScheduleController::revisionPageTitle in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Controller/ScheduleController.php \Drupal\business_rules\Controller\ScheduleController::revisionPageTitle()

Page title callback for a Schedule revision.

Parameters

int $schedule_revision: The Schedule revision ID.

Return value

string The page title.

File

src/Controller/ScheduleController.php, line 213

Class

ScheduleController
Class ScheduleController.

Namespace

Drupal\business_rules\Controller

Code

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