else {
$form['langcode'] = [
'#type' => 'value',
- '#value' => $this->path['langcode']
+ '#value' => $this->path['langcode'],
];
}
}
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]));
}
}
$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');
}