Elgg  Version 6.1
admin.php
Go to the documentation of this file.
1 <?php
26 function elgg_get_admins(array $options = []) {
27  $options['type'] = 'user';
28  $options['metadata_name_value_pairs'] = elgg_extract('metadata_name_value_pairs', $options, []);
29 
30  $options['metadata_name_value_pairs']['admin'] = 'yes';
31 
33 }
34 
51 function elgg_add_admin_notice(string $id, string $message): ?\ElggAdminNotice {
52  return _elgg_services()->adminNotices->add($id, $message);
53 }
54 
63 function elgg_delete_admin_notice(string $id): bool {
64  return _elgg_services()->adminNotices->delete($id);
65 }
66 
75 function elgg_get_admin_notices(array $options = []) {
76  return _elgg_services()->adminNotices->find($options);
77 }
78 
87 function elgg_admin_notice_exists(string $id): bool {
88  return _elgg_services()->adminNotices->exists($id);
89 }
elgg_admin_notice_exists(string $id)
Check if an admin notice is currently active.
Definition: admin.php:87
elgg_delete_admin_notice(string $id)
Remove an admin notice by ID.
Definition: admin.php:63
elgg_get_admin_notices(array $options=[])
Get admin notices.
Definition: admin.php:75
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:256
elgg_get_admins(array $options=[])
Elgg admin functions.
Definition: admin.php:26
if($who_can_change_language=== 'nobody') elseif($who_can_change_language=== 'admin_only'&&!elgg_is_admin_logged_in()) $options
Definition: language.php:20
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
Definition: entities.php:507
Admin Notice.
elgg_add_admin_notice(string $id, string $message)
Write a persistent message to the admin view.
Definition: admin.php:51
_elgg_services()
Get the global service provider.
Definition: elgglib.php:353
$id
Generic annotation delete action.
Definition: delete.php:6