Manages notifications in the ProcessWire admin, primarily for internal use.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Notice class also inherits all the methods and properties of: WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
Notice::__construct(string $text)
(nothing)Create the Notice 
Notice::addFlag($flag)
(nothing)Add a flag 
Notice::class string Class of notice 
Notice::flags()
intGet or set flags
Can also be used as property: Notice::flags
 
Notice::get(string $key)
mixedGet property 
Notice::getName()
stringGet the name for this type of Notice 
Notice::hasFlag($flag)
boolDoes this Notice have given flag? 
Notice::icon string Name of icon to use with Notice 
Notice::idStr string Unique ID string for Notice 
Notice::qty int Number of times this Notice was added.  
Notice::removeFlag($flag)
(nothing)Remove a flag 
Notice::set(string $key, mixed $value)
this WireDataSet property 
Notice::text string object array Text or value of notice 
Notice::timestamp int Unix timestamp of when the notice was generated 

Constants

NameReturnSummary 
Notice::admin const524288Ignore notice unless user is somewhere in the admin (login page included) @since 3.0.149 
Notice::allowDuplicate const8388608Present duplicate notices separately rather than collapsing them to one String name can be referred to as 'allowDuplicate' or just 'duplicate' @since 3.0.208 
Notice::allowMarkdown const4194304Allow parsing of basic/inline markdown and bracket markup per $sanitizer->entitiesMarkdown() @since 3.0.165 
Notice::allowMarkup const32Flag indicates the notice is allowed to contain markup and won’t be automatically entity encoded Note: entity encoding is done by the admin theme at output time, which should detect this flag. 
Notice::anonymous const65536Make notice anonymous (not tied to a particular class) @since 3.0.135 
Notice::debug const2Flag indicates the notice is for when debug mode is on only 
Notice::duplicate const8388608Alias of allowDuplicate flag @since 3.0.208 
Notice::log const8Flag indicates the notice will also be sent to the messages or errors log 
Notice::logOnly const16Flag indicates the notice will be logged, but not shown 
Notice::login const262144Ignore notice unless it will be seen by a logged-in user @since 3.0.149 
Notice::markdown const4194304Alias of allowMarkdown flag @since 3.0.208 
Notice::markup const32Alias of allowMarkup flag @since 3.0.208 
Notice::noGroup const131072Indicate notice should not group/collapse with others of the same type (when supported by admin theme) @since 3.0.146 
Notice::prepend const1Flag indicates notice should prepend (rather than append) to any existing notices @since 3.0.135 
Notice::separate const131072Alias of noGroup flag @since 3.0.208 
Notice::superuser const1048576Ignore notice unless current user is a superuser @since 3.0.149 

Additional methods and properties

In addition to the methods and properties above, Notice also inherits the methods and properties of these classes:

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

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer