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.
Common
Name | Return | Summary | |
---|---|---|---|
Notice::__construct() Notice::__construct(string $text) Notice::__construct(string $text, $flags = 0) | (nothing) | Create the Notice | |
Notice::addFlag() Notice::addFlag($flag) Notice::addFlag($flag) | (nothing) | Add a flag | |
Notice::class | string | Class of notice | |
Notice::flags() Notice::flags() Notice::flags($value = null) | int | Get or set flags Can also be used as property: Notice::flags | |
Notice::get() Notice::get(string $key) Notice::get(string $key) | mixed | Get property | |
Notice::getName() Notice::getName() Notice::getName() | string | Get the name for this type of Notice | |
Notice::hasFlag() Notice::hasFlag($flag) Notice::hasFlag($flag) | bool | Does 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() Notice::removeFlag($flag) Notice::removeFlag($flag) | (nothing) | Remove a flag | |
Notice::set() Notice::set(string $key, mixed $value) Notice::set(string $key, mixed $value) | this WireData | Set property | |
Notice::text | string object array | Text or value of notice | |
Notice::timestamp | int | Unix timestamp of when the notice was generated |
Constants
Name | Return | Summary | |
---|---|---|---|
Notice::admin const | 524288 | Ignore notice unless user is somewhere in the admin (login page included) @since 3.0.149 | |
Notice::allowDuplicate const | 8388608 | Present 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 const | 4194304 | Allow parsing of basic/inline markdown and bracket markup per $sanitizer->entitiesMarkdown() @since 3.0.165 | |
Notice::allowMarkup const | 32 | Flag 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 const | 65536 | Make notice anonymous (not tied to a particular class) @since 3.0.135 | |
Notice::debug const | 2 | Flag indicates the notice is for when debug mode is on only | |
Notice::duplicate const | 8388608 | Alias of allowDuplicate flag @since 3.0.208 | |
Notice::log const | 8 | Flag indicates the notice will also be sent to the messages or errors log | |
Notice::logOnly const | 16 | Flag indicates the notice will be logged, but not shown | |
Notice::login const | 262144 | Ignore notice unless it will be seen by a logged-in user @since 3.0.149 | |
Notice::markdown const | 4194304 | Alias of allowMarkdown flag @since 3.0.208 | |
Notice::markup const | 32 | Alias of allowMarkup flag @since 3.0.208 | |
Notice::noGroup const | 131072 | Indicate notice should not group/collapse with others of the same type (when supported by admin theme) @since 3.0.146 | |
Notice::prepend const | 1 | Flag indicates notice should prepend (rather than append) to any existing notices @since 3.0.135 | |
Notice::separate const | 131072 | Alias of noGroup flag @since 3.0.208 | |
Notice::superuser const | 1048576 | Ignore 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