You are here

public function EventAccessResetForm::getQuestion in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 src/Form/EventAccessResetForm.php \Drupal\rng\Form\EventAccessResetForm::getQuestion()
  2. 3.x src/Form/EventAccessResetForm.php \Drupal\rng\Form\EventAccessResetForm::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/EventAccessResetForm.php, line 82

Class

EventAccessResetForm
Form controller to reset event access to defaults.

Namespace

Drupal\rng\Form

Code

public function getQuestion() {
  if (!$this->eventMeta
    ->isDefaultRules('rng_event.register')) {
    return $this
      ->t('Are you sure you want to reset access rules to site defaults?');
  }
  else {
    return $this
      ->t('Are you sure you want to customize access rules?');
  }
}