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'] = [
* {@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']]));
}
}