Elgg  Version 6.0
Public Member Functions | List of all members
Elgg\Database\AdminNotices Class Reference

Controls all admin notices in the system. More...

Public Member Functions

 add (string $id, string $message)
 Write a persistent message to the admin view. More...
 
 delete (string $id= '')
 Remove an admin notice by ID. More...
 
 find (array $options=[])
 Get admin notices. More...
 
 exists (string $id)
 Check if an admin notice is currently active. More...
 

Detailed Description

Controls all admin notices in the system.

Definition at line 11 of file AdminNotices.php.

Member Function Documentation

Elgg\Database\AdminNotices::add ( string  $id,
string  $message 
)

Write a persistent message to the admin view.

Useful to alert the admin to take a certain action. The id is a unique ID that can be cleared once the admin completes the action.

Parameters
string$idA unique ID that your plugin can remember
string$messageBody of the message
Returns
|null

Definition at line 24 of file AdminNotices.php.

Elgg\Database\AdminNotices::delete ( string  $id = '')

Remove an admin notice by ID.

Parameters
string$idThe unique ID assigned in add_admin_notice()
Returns
bool

Definition at line 52 of file AdminNotices.php.

Elgg\Database\AdminNotices::exists ( string  $id)

Check if an admin notice is currently active.

Parameters
string$idThe unique ID used to register the notice.
Returns
bool
Since
1.8.0

Definition at line 97 of file AdminNotices.php.

Elgg\Database\AdminNotices::find ( array  $options = [])

Get admin notices.

An admin must be logged in since the notices are private.

Parameters
array$optionsQuery options
Returns
[]|int|mixed Admin notices

Definition at line 80 of file AdminNotices.php.


The documentation for this class was generated from the following file: