You are here

public function RevisionRevertForm::getQuestion in Entity API 8.0

Same name and namespace in other branches
  1. 8 src/Form/RevisionRevertForm.php \Drupal\entity\Form\RevisionRevertForm::getQuestion()

Returns the question to ask the user.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form question. The page title will be set to this value.

Overrides ConfirmFormInterface::getQuestion

File

src/Form/RevisionRevertForm.php, line 75
Contains \Drupal\entity\Form\RevisionRevertForm.

Class

RevisionRevertForm

Namespace

Drupal\entity\Form

Code

public function getQuestion() {
  if ($this->revision instanceof EntityRevisionLogInterface) {
    return $this
      ->t('Are you sure you want to revert to the revision from %revision-date?', [
      '%revision-date' => $this->dateFormatter
        ->format($this->revision
        ->getRevisionCreationTime()),
    ]);
  }
  return $this
    ->t('Are you sure you want to revert the revision?');
}