You are here

public function UserEmailChangeCancelForm::getDescription in Email confirmer 8

Returns additional text to display as a description.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form description.

Overrides ContentEntityConfirmFormBase::getDescription

File

email_confirmer_user/src/Form/UserEmailChangeCancelForm.php, line 76

Class

UserEmailChangeCancelForm
User pending email change cancellation form.

Namespace

Drupal\email_confirmer_user\Form

Code

public function getDescription() {
  return ($this
    ->currentUser()
    ->id() == $this->entity
    ->id() ? $this
    ->t('Your current email address %email will be preserved.', [
    '%email' => $this->entity
      ->getEmail(),
  ]) : $this
    ->t("The current user's email address %email will be preserved.", [
    '%email' => $this->entity
      ->getEmail(),
  ])) . ' ' . parent::getDescription();
}