You are here

public function SimpleMegaMenuController::revisionPageTitle in Simple Mega Menu 2.0.x

Same name and namespace in other branches
  1. 8 src/Controller/SimpleMegaMenuController.php \Drupal\simple_megamenu\Controller\SimpleMegaMenuController::revisionPageTitle()

Page title callback for a Simple mega menu revision.

Parameters

int $simple_mega_menu_revision: The Simple mega menu revision ID.

Return value

string The page title.

File

src/Controller/SimpleMegaMenuController.php, line 87

Class

SimpleMegaMenuController
Class SimpleMegaMenuController.

Namespace

Drupal\simple_megamenu\Controller

Code

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