diff --git a/src/Form/JsonapiResourceConfigForm.php b/src/Form/JsonapiResourceConfigForm.php index 15ed1c984f38df2a7f866e09b1ee2fe9b1db05c1..f85837a9b70c0eca76ccb55895e6101d83b7be7a 100644 --- a/src/Form/JsonapiResourceConfigForm.php +++ b/src/Form/JsonapiResourceConfigForm.php @@ -203,18 +203,17 @@ class JsonapiResourceConfigForm extends EntityForm { public function save(array $form, FormStateInterface $form_state) { $resource_config = $this->entity; $status = $resource_config->save(); + $type = $resource_config->get('resourceType') ?? ''; switch ($status) { - case SAVED_NEW: - $this->messenger()->addStatus($this->t('Created the %label JSON:API Resource overwrites.', [ - '%label' => $resource_config->id(), - ])); + case SAVED_NEW : + $this->messenger()->addStatus($this->t('Created the %type JSON:API Resource overwrites.', [ + '%type' => $type])); break; - default: - $this->messenger()->addStatus($this->t('Saved the %label JSON:API Resource overwrites.', [ - '%label' => $resource_config->id(), - ])); + default : + $this->messenger()->addStatus($this->t('Saved the %type JSON:API Resource overwrites.', [ + '%type' => $type])); } $form_state->setRedirectUrl($resource_config->toUrl('collection')); }