You are here

function devel_set_message in Devel 8.2

Same name and namespace in other branches
  1. 8.3 devel.module \devel_set_message()
  2. 8 devel.module \devel_set_message()
  3. 7 devel.module \devel_set_message()
  4. 4.x devel.module \devel_set_message()

Sets message.

File

./devel.module, line 145
This module holds functions useful for Drupal development.

Code

function devel_set_message($msg, $type = NULL) {
  if (function_exists('drush_log')) {
    drush_log($msg, $type);
  }
  else {
    \Drupal::messenger()
      ->addMessage($msg, $type, TRUE);
  }
}