You are here

public function HomeboxLayoutController::revisionPageTitle in Homebox 8

Page title callback for a Homebox Layout revision.

Parameters

int $homebox_layout_revision: The Homebox Layout revision ID.

Return value

string The page title.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Controller/HomeboxLayoutController.php, line 157

Class

HomeboxLayoutController
Class HomeboxLayoutController.

Namespace

Drupal\homebox\Controller

Code

public function revisionPageTitle($homebox_layout_revision) {

  /* @var HomeboxLayoutInterface $homebox_layout */
  $homebox_layout = $this
    ->entityTypeManager()
    ->getStorage('homebox_layout')
    ->loadRevision($homebox_layout_revision);
  return $this
    ->t('Revision of %title from %date', [
    '%title' => $homebox_layout
      ->label(),
    '%date' => $this->dateFormatter
      ->format($homebox_layout
      ->getRevisionCreationTime()),
  ]);
}