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

WARNING: API IN FLUX. More...

Public Member Functions

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

Detailed Description

WARNING: API IN FLUX.

DO NOT USE DIRECTLY.

Controls all admin notices in the system.

Definition at line 16 of file AdminNotices.php.

Member Function Documentation

Elgg\Database\AdminNotices::add (   $id,
  $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.

eg: add_admin_notice('twitter_services_no_api', 'Before your users can use Twitter services on this site, you must set up the Twitter API key in the Twitter Services Settings');

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

Definition at line 33 of file AdminNotices.php.

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

Remove an admin notice by ID.

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

Definition at line 70 of file AdminNotices.php.

Elgg\Database\AdminNotices::exists (   $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 117 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 100 of file AdminNotices.php.


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