public function UserController::revisionPageTitle in User Revision 8
Page title callback for a user revision.
Parameters
int $user_revision: The user revision ID.
Return value
string The page title.
\Drupal\Core\StringTranslation\TranslatableMarkup
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 string reference to 'UserController::revisionPageTitle'
File
- src/
Controller/ UserController.php, line 210
Class
- UserController
- Returns responses for User revision routes.
Namespace
Drupal\user_revision\ControllerCode
public function revisionPageTitle($user_revision) {
$user = $this->entityTypeManager
->getStorage('user')
->loadRevision($user_revision);
return $this
->t('Revision of %title from %date', array(
'%title' => $user
->label(),
'%date' => $this->dateFormatter
->format($user
->get('revision_timestamp')->value),
));
}