Elgg
Version 2.3
|
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 ($limit=10) | |
Get admin notices. More... | |
exists ($id) | |
Check if an admin notice is currently active. More... | |
Definition at line 15 of file AdminNotices.php.
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');
string | $id | A unique ID that your plugin can remember |
string | $message | Body of the message |
Definition at line 31 of file AdminNotices.php.
Elgg\Database\AdminNotices::delete | ( | $id | ) |
Remove an admin notice by ID.
eg In actions/twitter_service/save_settings: if (is_valid_twitter_api_key()) { delete_admin_notice('twitter_services_no_api'); }
string | $id | The unique ID assigned in add_admin_notice() |
Definition at line 69 of file AdminNotices.php.
Elgg\Database\AdminNotices::exists | ( | $id | ) |
Check if an admin notice is currently active.
string | $id | The unique ID used to register the notice. |
Definition at line 114 of file AdminNotices.php.
Elgg\Database\AdminNotices::find | ( | $limit = 10 | ) |
Get admin notices.
An admin must be logged in since the notices are private.
int | $limit | Limit |
Definition at line 97 of file AdminNotices.php.