You are here

public function EventAccessResetForm::getDescription in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Form/EventAccessResetForm.php \Drupal\rng\Form\EventAccessResetForm::getDescription()
  2. 3.x src/Form/EventAccessResetForm.php \Drupal\rng\Form\EventAccessResetForm::getDescription()

Returns additional text to display as a description.

Return value

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

Overrides ConfirmFormBase::getDescription

File

src/Form/EventAccessResetForm.php, line 94

Class

EventAccessResetForm
Form controller to reset event access to defaults.

Namespace

Drupal\rng\Form

Code

public function getDescription() {
  if (!$this->eventMeta
    ->isDefaultRules('rng_event.register')) {
    return $this
      ->t('Custom access rules will be deleted.');
  }
  else {
    return $this
      ->t('Rules for this event will no longer match site defaults.');
  }
}