25 if (!$id || !$message) {
33 $admin_notice = new \ElggAdminNotice();
34 $admin_notice->admin_notice_id =
$id;
35 $admin_notice->description =
$message;
39 return $admin_notice->save();
42 return $result ? $admin_notice : null;
52 public function delete(
string $id =
''):
bool {
57 'metadata_name' =>
'admin_notice_id',
58 'metadata_value' => $id,
61 'batch_inc_offset' =>
false,
83 'subtype' =>
'admin_notice',
97 public function exists(
string $id): bool {
101 'subtype' =>
'admin_notice',
102 'metadata_name_value_pair' => [
'name' =>
'admin_notice_id',
'value' => $id],
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
elgg_admin_notice_exists(string $id)
Check if an admin notice is currently active.
static find(array $options=[])
Build and execute a new query from an array of legacy options.
add(string $id, string $message)
Write a persistent message to the admin view.
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
const ELGG_IGNORE_ACCESS
elgg_call() flags
elgg_count_entities(array $options=[])
Returns a count of entities.
exists(string $id)
Check if an admin notice is currently active.
find(array $options=[])
Get admin notices.
$id
Generic annotation delete action.
Controls all admin notices in the system.