Commit c02696d0 authored by git's avatar git Committed by Eirik Morland
Browse files

Issue #3148906 by Project Update Bot, jcnventura, eiriksm: Automated Drupal 9 compatibility fixes

parent 5a91210d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -56,9 +56,9 @@ class SettingsForm extends ConfigFormBase {
        $default_sender = $this->config('mailsystem.settings')
          ->get('defaults.sender');
        if ($default_sender != $this::MAIL_KEY) {
          drupal_set_message($this->t('It seems you are using the mailsystem module to control your mail, but the default sender is not set to Sparkpost. If this is not on purpose you should probably <a href="@url">adjust the settings at this page.</a>', [
          $this->messenger()->addWarning($this->t('It seems you are using the mailsystem module to control your mail, but the default sender is not set to Sparkpost. If this is not on purpose you should probably <a href="@url">adjust the settings at this page.</a>', [
            '@url' => Url::fromRoute('mailsystem.settings')->toString(),
          ]), 'warning');
          ]));
        }
      }
      else {
@@ -68,12 +68,12 @@ class SettingsForm extends ConfigFormBase {
        $default_system = $this->config($config_collection)
          ->get($config_key);
        if ($default_system != $this::MAIL_KEY) {
          drupal_set_message($this->t('You seem to be using %system as your mail system instead of %sparkpost. If this is not on purpose, you should change the configration for %config_key in %config to %sparkpost.', [
          $this->messenger()->addWarning($this->t('You seem to be using %system as your mail system instead of %sparkpost. If this is not on purpose, you should change the configration for %config_key in %config to %sparkpost.', [
            '%system' => $default_system,
            '%sparkpost' => $this::MAIL_KEY,
            '%config_key' => $config_key,
            '%config' => $config_collection,
          ]), 'warning');
          ]));
        }
      }
      $form['api_hostname'] = [
+2 −2
Original line number Diff line number Diff line
@@ -108,9 +108,9 @@ class TestMailForm extends FormBase {
    // Send.
    $message = $this->mailManager->mail('sparkpost', 'test_mail_form', $to, LanguageInterface::LANGCODE_NOT_SPECIFIED, $params);
    if ($message['result']) {
      drupal_set_message($this->t('Sparkpost test email sent to %to.', [
      $this->messenger()->addStatus($this->t('Sparkpost test email sent to %to.', [
        '%to' => $to,
      ]), 'status');
      ]));
    }
    else {
      $form_state->setRebuild();