* {@inheritdoc}
*/
public function validateForm(array &$form, FormStateInterface $form_state) {
- drupal_set_message($this->t('The FormTestServiceObject::validateForm() method was used for this form.'));
+ $this->messenger()->addStatus($this->t('The FormTestServiceObject::validateForm() method was used for this form.'));
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
- drupal_set_message($this->t('The FormTestServiceObject::submitForm() method was used for this form.'));
+ $this->messenger()->addStatus($this->t('The FormTestServiceObject::submitForm() method was used for this form.'));
$this->config('form_test.object', FALSE)
->set('bananas', $form_state->getValue('bananas'))
->save();