You are here

public function LibraryItemController::revisionShow in Paragraphs 8

Display a library item revision.

Parameters

int $paragraphs_library_item_revision: The library item revision ID.

Return value

array An array suitable for drupal_render().

1 string reference to 'LibraryItemController::revisionShow'
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 178

Class

LibraryItemController

Namespace

Drupal\paragraphs_library\Controller

Code

public function revisionShow($paragraphs_library_item_revision) {
  $library_item = $this->entityTypeManager
    ->getStorage('paragraphs_library_item')
    ->loadRevision($paragraphs_library_item_revision);
  $view = $this->entityTypeManager
    ->getViewBuilder('paragraphs_library_item')
    ->view($library_item);
  return $view;
}