Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / block / tests / modules / block_test / src / Form / TestForm.php
index 7fa645df5fbafa857ea006b32910ad316add4fb2..55b13f78258005703a87b08f7688bd88b39baff4 100644 (file)
@@ -25,7 +25,7 @@ class TestForm extends FormBase {
   public function buildForm(array $form, FormStateInterface $form_state) {
     $form['email'] = [
       '#type' => 'email',
-      '#title' => $this->t('Your .com email address.')
+      '#title' => $this->t('Your .com email address.'),
     ];
 
     $form['show'] = [
@@ -49,7 +49,7 @@ class TestForm extends FormBase {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    drupal_set_message($this->t('Your email address is @email', ['@email' => $form['email']['#value']]));
+    $this->messenger()->addStatus($this->t('Your email address is @email', ['@email' => $form['email']['#value']]));
   }
 
 }