drupal 8 how to output to messages are on page code example
Example: drupa 8 how to output to messages are on page
drupal_set_message(t('An error occurred and processing did not complete.'), 'error');
drupal_set_message(t('An error occurred and processing did not complete.'), 'error');