Wire::message() method

Record an informational or “success” message in the system-wide notices.

This method automatically identifies the message as coming from this class.


$this->message("This is the notice text");
$this->message("This notice is also logged", true);
$this->message("This notice is only shown in debug mode", Notice::debug);
$this->message("This notice allows <em>markup</em>", Notice::allowMarkup);
$this->message("Notice using multiple flags", Notice::debug | Notice::logOnly);


// basic usage

// usage with all arguments
$wire->message($text, $flags = 0);


textstring, array, Wire

Text to include in the notice

flags (optional)int, bool, string

Optional flags to alter default behavior:

  • Notice::admin (constant): Show notice only if user is in the admin.
  • Notice::allowMarkdown (constant): Allow basic markdown and bracket markup (see $sanitizer->entitiesMarkdown()).
  • Notice::allowMarkup (constant): Indicates notice should allow the use of HTML markup tags.
  • Notice::debug (constant): Indicates notice should only be shown when debug mode is active.
  • Notice::log (constant): Indicates notice should also be logged.
  • Notice::logOnly (constant): Indicates notice should only be logged.
  • Notice::login (constant): Show notice only if it will be seen by a logged-in user.
  • Notice::noGroup (constant): Indicates notice should not group with others of the same type (where supported).
  • Notice::prepend (constant): Indicates notice should prepend rather than append.
  • Notice::superuser (constant): Show notice only if current user is a superuser.
  • true (boolean): Shortcut for the Notice::log constant.
  • In 3.0.149+ you may also specify a space-separated string of flag names, i.e. "admin log noGroup".

Return value


Object instance it was called from (method supports fluent interface).

See Also

Wire methods and properties

API reference based on ProcessWire core version 3.0.209

Twitter updates

  • Adding custom actions to ProcessWire image fields in the admin, part of this week’s dev branch additions: More
    27 January 2023
  • ProcessWire 3.0.210 new main/master version released— More
    6 January 2023
  • ProcessWire 3.0.209: Core updates and an interesting AI that knows ProcessWire– More
    30 December 2022

Latest news

  • ProcessWire Weekly #456
    The 456th issue of ProcessWire Weekly covers latest core updates, introduces a new third party module called TextformatterRockDown, and more. Read on!
    Weekly.pw / 4 February 2023
  • ProcessWire 3.0.210 new main/master version
    140 commits, 55 resolved issues, dozens of new features, eight contributors, and five new pull requests make yet another great new version of ProcessWire.
    Blog / 6 January 2023
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull