protected function SubscriberForm::getSubmitMessage in Simplenews 3.x
Same name and namespace in other branches
- 8.2 src/Form/SubscriberForm.php \Drupal\simplenews\Form\SubscriberForm::getSubmitMessage()
- 8 src/Form/SubscriberForm.php \Drupal\simplenews\Form\SubscriberForm::getSubmitMessage()
Returns a message to display to the user upon successful form submission.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: Form state object.
bool $confirm: Whether a confirmation mail is sent or not.
Return value
string A HTML message.
Overrides SubscriptionsFormBase::getSubmitMessage
File
- src/
Form/ SubscriberForm.php, line 81
Class
- SubscriberForm
- Form controller for the subscriber edit forms.
Namespace
Drupal\simplenews\FormCode
protected function getSubmitMessage(FormStateInterface $form_state, $confirm) {
if ($this
->getFormId() == 'simplenews_subscriber_add_form') {
return $this
->t('Subscriber %label has been added.', [
'%label' => $this->entity
->label(),
]);
}
return $this
->t('Subscriber %label has been updated.', [
'%label' => $this->entity
->label(),
]);
}