X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fpath%2Fsrc%2FForm%2FPathFormBase.php;h=4b1cbd59127885b67711dac453099b71703728c9;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=5172419d793c1b31029f8ba7b379773ba56a72c2;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/modules/path/src/Form/PathFormBase.php b/web/core/modules/path/src/Form/PathFormBase.php index 5172419d7..4b1cbd591 100644 --- a/web/core/modules/path/src/Form/PathFormBase.php +++ b/web/core/modules/path/src/Form/PathFormBase.php @@ -138,7 +138,7 @@ abstract class PathFormBase extends FormBase { else { $form['langcode'] = [ '#type' => 'value', - '#value' => $this->path['langcode'] + '#value' => $this->path['langcode'], ]; } @@ -192,7 +192,7 @@ abstract class PathFormBase extends FormBase { } if (!$this->pathValidator->isValid(trim($source, '/'))) { - $form_state->setErrorByName('source', t("The path '@link_path' is either invalid or you do not have access to it.", ['@link_path' => $source])); + $form_state->setErrorByName('source', t("Either the path '@link_path' is invalid or you do not have access to it.", ['@link_path' => $source])); } } @@ -212,7 +212,7 @@ abstract class PathFormBase extends FormBase { $this->aliasStorage->save($source, $alias, $langcode, $pid); - drupal_set_message($this->t('The alias has been saved.')); + $this->messenger()->addStatus($this->t('The alias has been saved.')); $form_state->setRedirect('path.admin_overview'); }