You are here

public function EmailConfirmerResponseForm::getConfirmText in Email confirmer 8

Returns a caption for the button that confirms the action.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The form confirmation text.

Overrides EntityConfirmFormBase::getConfirmText

File

src/Form/EmailConfirmerResponseForm.php, line 27

Class

EmailConfirmerResponseForm
Email confirmation response form.

Namespace

Drupal\email_confirmer\Form

Code

public function getConfirmText() {

  /** @var \Drupal\email_confirmer\EmailConfirmationInterface $confirmation */
  $confirmation = $this
    ->getEntity();
  return $confirmation
    ->isPending() ? $this
    ->t('Send') : $this
    ->t('OK');
}