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.

Example

$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);

Usage

// basic usage
$wire->message($text);

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

Arguments

NameType(s)Description
textstring, array, Wire

Text to include in the notice

flags (optional)int, bool

Optional flags to alter default behavior:

  • 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::allowMarkup (constant): Indicates notice should allow the use of HTML markup tags.
  • true (boolean): Shortcut for the Notice::log constant.

Return value

$this

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.137

Twitter updates

  • ProcessWire 3.0.142 has a lot of updates but the biggest is the addition of custom fields support for file and image fields. In this post, we take a closer look at that, and also outline all of the new features in the just-released FormBuilder v40— More
    11 October 2019
  • This week’s dev branch version brings you improvements to ProcessWire’s input->cookie API variable, plus it adds the ability to modify system URLs and paths at runtime. This post also includes some examples to demonstrate just how useful this can be— More
    20 September 2019
  • New post: This week we’ll take a look at a new version of FormBuilder that's on the way (with a screencast), as well as the latest version of the core: ProcessWire 3.0.140— More
    6 September 2019

Latest news

  • ProcessWire Weekly #283
    The 283rd issue of ProcessWire Weekly introduces ProcessWire 3.0.142 and FormBuilder v40, highlights some conference content, and features a new weekly poll continuing with the #processwireworks theme. Read on!
    Weekly.pw / 12 October 2019
  • ProcessWire 3.0.142 core updates
    This latest version of the core on the dev branch has a lot of updates, bnd the biggest is the addition of custom fields support for file and image fields. In this post, we take a closer look and also outline all of the new features in the just-released FormBuilder v40.
    Blog / 11 October 2019
  • Subscribe to weekly ProcessWire news

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer