You are here

public function DisableForm::getQuestion in Content Moderation Notifications 8.3

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/DisableForm.php, line 31

Class

DisableForm
The enable/disable form for content moderation notification entities.

Namespace

Drupal\content_moderation_notifications\Form

Code

public function getQuestion() {
  if ($this->notification
    ->status()) {
    return $this
      ->t('Disable notification %label?', [
      '%label' => $this->notification
        ->label(),
    ]);
  }
  return $this
    ->t('Enable notification %label?', [
    '%label' => $this->notification
      ->label(),
  ]);
}