Loading src/Form/RegistrationTypeForm.php +10 −5 Original line number Diff line number Diff line Loading @@ -89,12 +89,17 @@ class RegistrationTypeForm extends EntityForm { $registration_type = $this->getEntity(); $status = $registration_type->save(); $message = ($status == SAVED_UPDATED) ? '%label registration type was updated.' : '%label registration type was added.'; $url = $registration_type->toUrl(); $t_args = ['%label' => $registration_type->label(), 'link' => Link::fromTextAndUrl(t('Edit'), $url)]; $t_args = ['%label' => $registration_type->id()]; if ($status == SAVED_NEW) { $message = $this->t('%label registration type was added.', $t_args); } else { $message = $this->t('%label registration type was updated.', $t_args); } $context = $t_args + ['link' => $registration_type->toLink($this->t('Edit'), 'edit-form')->toString()]; $this->messenger()->addMessage($this->t($message, $t_args)); $this->logger('rng')->notice($message, $t_args); $this->messenger()->addMessage($message); $this->logger('rng')->notice($message->getUntranslatedString(), $context); $form_state->setRedirect('rng.registration_type.overview'); } Loading Loading
src/Form/RegistrationTypeForm.php +10 −5 Original line number Diff line number Diff line Loading @@ -89,12 +89,17 @@ class RegistrationTypeForm extends EntityForm { $registration_type = $this->getEntity(); $status = $registration_type->save(); $message = ($status == SAVED_UPDATED) ? '%label registration type was updated.' : '%label registration type was added.'; $url = $registration_type->toUrl(); $t_args = ['%label' => $registration_type->label(), 'link' => Link::fromTextAndUrl(t('Edit'), $url)]; $t_args = ['%label' => $registration_type->id()]; if ($status == SAVED_NEW) { $message = $this->t('%label registration type was added.', $t_args); } else { $message = $this->t('%label registration type was updated.', $t_args); } $context = $t_args + ['link' => $registration_type->toLink($this->t('Edit'), 'edit-form')->toString()]; $this->messenger()->addMessage($this->t($message, $t_args)); $this->logger('rng')->notice($message, $t_args); $this->messenger()->addMessage($message); $this->logger('rng')->notice($message->getUntranslatedString(), $context); $form_state->setRedirect('rng.registration_type.overview'); } Loading