Mercurial > hg > isophonics-drupal-site
comparison core/modules/ban/src/Form/BanAdmin.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
118 * {@inheritdoc} | 118 * {@inheritdoc} |
119 */ | 119 */ |
120 public function submitForm(array &$form, FormStateInterface $form_state) { | 120 public function submitForm(array &$form, FormStateInterface $form_state) { |
121 $ip = trim($form_state->getValue('ip')); | 121 $ip = trim($form_state->getValue('ip')); |
122 $this->ipManager->banIp($ip); | 122 $this->ipManager->banIp($ip); |
123 drupal_set_message($this->t('The IP address %ip has been banned.', ['%ip' => $ip])); | 123 $this->messenger()->addStatus($this->t('The IP address %ip has been banned.', ['%ip' => $ip])); |
124 $form_state->setRedirect('ban.admin_page'); | 124 $form_state->setRedirect('ban.admin_page'); |
125 } | 125 } |
126 | 126 |
127 } | 127 } |