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

Constants

NameReturnSummary 
admin const524288Ignore notice unless user is somewhere in the admin (login page included) @since 3.0.149 
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 
allowMarkdown const4194304Allow parsing of basic/inline markdown and bracket markup per $sanitizer->entitiesMarkdown() @since 3.0.165 
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. 
anonymous const65536Make notice anonymous (not tied to a particular class) @since 3.0.135 
debug const2Flag indicates the notice is for when debug mode is on only 
duplicate const8388608Alias of allowDuplicate flag @since 3.0.208 
log const8Flag indicates the notice will also be sent to the messages or errors log 
logOnly const16Flag indicates the notice will be logged, but not shown 
login const262144Ignore notice unless it will be seen by a logged-in user @since 3.0.149 
markdown const4194304Alias of allowMarkdown flag @since 3.0.208 
markup const32Alias of allowMarkup flag @since 3.0.208 
noGroup const131072Indicate notice should not group/collapse with others of the same type (when supported by admin theme) @since 3.0.146 
prepend const1Flag indicates notice should prepend (rather than append) to any existing notices @since 3.0.135 
separate const131072Alias of noGroup flag @since 3.0.208 
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.244

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani