You are here

public function HomeboxLayoutController::revisionShow in Homebox 8

Displays a Homebox Layout revision.

Parameters

int $homebox_layout_revision: The Homebox Layout revision ID.

Return value

array An array suitable for drupal_render().

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Controller/HomeboxLayoutController.php, line 138

Class

HomeboxLayoutController
Class HomeboxLayoutController.

Namespace

Drupal\homebox\Controller

Code

public function revisionShow($homebox_layout_revision) {
  $homebox_layout = $this
    ->entityTypeManager()
    ->getStorage('homebox_layout')
    ->loadRevision($homebox_layout_revision);
  $view_builder = $this
    ->entityTypeManager()
    ->getViewBuilder('homebox_layout');
  return $view_builder
    ->view($homebox_layout);
}