You are here

public function LibraryItemController::revisionPageTitle in Paragraphs 8

Page title callback for library item revision.

Parameters

int $paragraphs_library_item_revision: The library item revision ID.

Return value

string The page title.

1 string reference to 'LibraryItemController::revisionPageTitle'
paragraphs_library.routing.yml in modules/paragraphs_library/paragraphs_library.routing.yml
modules/paragraphs_library/paragraphs_library.routing.yml

File

modules/paragraphs_library/src/Controller/LibraryItemController.php, line 160

Class

LibraryItemController

Namespace

Drupal\paragraphs_library\Controller

Code

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