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

Latest news

  • ProcessWire Weekly #519
    In the 519th issue of ProcessWire Weekly we'll check out a new third party module called RockForms, introduce the latest ProcessWire core updates, and more. Read on!
    Weekly.pw / 20 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • 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