Elgg  Version 3.0
Namespaces | Functions | Variables
admin.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Updates the advanced settings for the primary site object.
 

Functions

 elgg_get_admins (array $options=[])
 Get the admin users. More...
 
 elgg_add_admin_notice ($id, $message)
 Write a persistent message to the admin view. More...
 
 elgg_delete_admin_notice ($id)
 Remove an admin notice by ID. More...
 
 elgg_get_admin_notices (array $options=[])
 Get admin notices. More...
 
 elgg_admin_notice_exists ($id)
 Check if an admin notice is currently active. More...
 
 _elgg_create_notice_of_pending_upgrade ($event, $type, $object)
 Add an admin notice when a new object is created. More...
 
 _elgg_admin_init ()
 Initialize the admin backend. More...
 
 _elgg_ajax_plugins_update ()
 Returns plugin listing and admin menu to the client (used after plugin (de)activation) More...
 
 _elgg_admin_header_menu ($hook, $type, $return, $params)
 Register menu items for the admin_header menu. More...
 
 _elgg_admin_footer_menu ($hook, $type, $return, $params)
 Register menu items for the admin_footer menu. More...
 
 _elgg_admin_page_menu (\Elgg\Hook $hook)
 Register menu items for the page menu. More...
 
 _elgg_admin_page_menu_plugin_settings (\Elgg\Hook $hook)
 Register plugin settings menu items for the admin page menu. More...
 
 _elgg_admin_user_unvalidated_bulk_menu (\Elgg\Hook $hook)
 Register menu items to the bulk actions for unvalidated users. More...
 
 _elgg_admin_page_handler ($page)
 Handle admin pages. More...
 
 _elgg_admin_maintenance_allow_url ($current_url)
 When in maintenance mode, should the given URL be handled normally? More...
 
 _elgg_admin_maintenance_handler ($hook, $type, $info)
 Handle requests when in maintenance mode. More...
 
 _elgg_admin_maintenance_action_check ($hook, $type)
 Prevent non-admins from using actions. More...
 
 _elgg_add_admin_widgets ($event, $type, $user)
 Adds default admin widgets to the admin dashboard. More...
 
 _elgg_admin_get_admin_subscribers_admin_action ($hook, $type, $return_value, $params)
 Add the current site admins to the subscribers when making/removing an admin user. More...
 
 _elgg_admin_prepare_admin_notification_make_admin ($hook, $type, $return_value, $params)
 Prepare the notification content for site admins about making a site admin. More...
 
 _elgg_admin_prepare_admin_notification_remove_admin ($hook, $type, $return_value, $params)
 Prepare the notification content for site admins about removing a site admin. More...
 
 _elgg_admin_get_user_subscriber_admin_action ($hook, $type, $return_value, $params)
 Add the user to the subscribers when making/removing the admin role. More...
 
 _elgg_admin_prepare_user_notification_make_admin ($hook, $type, $return_value, $params)
 Prepare the notification content for the user being made as a site admins. More...
 
 _elgg_admin_prepare_user_notification_remove_admin ($hook, $type, $return_value, $params)
 Prepare the notification content for the user being removed as a site admins. More...
 
 _elgg_admin_upgrades_menu (\Elgg\Hook $hook)
 Add menu items to the filter menu on the admin upgrades page. More...
 

Variables

return function (\Elgg\EventsService $events,\Elgg\HooksRegistrationService $hooks)
 

Function Documentation

_elgg_add_admin_widgets (   $event,
  $type,
  $user 
)

Adds default admin widgets to the admin dashboard.

Parameters
string$event'make_admin'
string$type'user'
\ElggUser$useraffected user
Returns
void

Definition at line 761 of file admin.php.

_elgg_admin_footer_menu (   $hook,
  $type,
  $return,
  $params 
)

Register menu items for the admin_footer menu.

Parameters
string$hook'register'
string$type'menu:admin_footer'

Definition at line 280 of file admin.php.

_elgg_admin_get_admin_subscribers_admin_action (   $hook,
  $type,
  $return_value,
  $params 
)

Add the current site admins to the subscribers when making/removing an admin user.

Parameters
string$hook'get'
string$type'subscribers'
array$return_valuecurrent subscribers
array$paramssupplied params
Returns
void|array

Definition at line 800 of file admin.php.

_elgg_admin_get_user_subscriber_admin_action (   $hook,
  $type,
  $return_value,
  $params 
)

Add the user to the subscribers when making/removing the admin role.

Parameters
string$hook'get'
string$type'subscribers'
array$return_valuecurrent subscribers
array$paramssupplied params
Returns
void|array

Definition at line 943 of file admin.php.

_elgg_admin_header_menu (   $hook,
  $type,
  $return,
  $params 
)

Register menu items for the admin_header menu.

Parameters
string$hook'register'
string$type'menu:admin_header'

Definition at line 221 of file admin.php.

_elgg_admin_init ( )

Initialize the admin backend.

Returns
void

Definition at line 131 of file admin.php.

_elgg_admin_maintenance_action_check (   $hook,
  $type 
)

Prevent non-admins from using actions.

Parameters
string$hookHook name
string$typeAction name
Returns
bool

Definition at line 720 of file admin.php.

_elgg_admin_maintenance_allow_url (   $current_url)

When in maintenance mode, should the given URL be handled normally?

Parameters
string$current_urlCurrent page URL
Returns
bool

Definition at line 664 of file admin.php.

_elgg_admin_maintenance_handler (   $hook,
  $type,
  $info 
)

Handle requests when in maintenance mode.

Parameters
string$hook'route'
string$type'all'
array$infocurrent return value
Returns
void|false

Definition at line 692 of file admin.php.

_elgg_admin_page_handler (   $page)

Handle admin pages.

Expects corresponding views as admin/section/subsection

Parameters
array$pageArray of pages
Returns
bool

Definition at line 605 of file admin.php.

_elgg_admin_page_menu ( \Elgg\Hook  $hook)

Register menu items for the page menu.

Parameters
\Elgg\Hook$hook'register' 'menu:page'
Returns
array

Definition at line 322 of file admin.php.

_elgg_admin_page_menu_plugin_settings ( \Elgg\Hook  $hook)

Register plugin settings menu items for the admin page menu.

Note
Plugin settings are alphabetically sorted in the submenu
Parameters
\Elgg\Hook$hook'register' 'menu:page'
Returns
array

Definition at line 487 of file admin.php.

_elgg_admin_prepare_admin_notification_make_admin (   $hook,
  $type,
  $return_value,
  $params 
)

Prepare the notification content for site admins about making a site admin.

Parameters
string$hook'prepare'
string$type'notification:make_admin:user:'
\Elgg\Notifications\Notification$return_valuecurrent notification content
array$paramssupplied params
Returns
void|

Definition at line 849 of file admin.php.

_elgg_admin_prepare_admin_notification_remove_admin (   $hook,
  $type,
  $return_value,
  $params 
)

Prepare the notification content for site admins about removing a site admin.

Parameters
string$hook'prepare'
string$type'notification:remove_admin:user:'
\Elgg\Notifications\Notification$return_valuecurrent notification content
array$paramssupplied params
Returns
void|

Definition at line 896 of file admin.php.

_elgg_admin_prepare_user_notification_make_admin (   $hook,
  $type,
  $return_value,
  $params 
)

Prepare the notification content for the user being made as a site admins.

Parameters
string$hook'prepare'
string$type'notification:make_admin:user:'
\Elgg\Notifications\Notification$return_valuecurrent notification content
array$paramssupplied params
Returns
void|

Definition at line 978 of file admin.php.

_elgg_admin_prepare_user_notification_remove_admin (   $hook,
  $type,
  $return_value,
  $params 
)

Prepare the notification content for the user being removed as a site admins.

Parameters
string$hook'prepare'
string$type'notification:remove_admin:user:'
\Elgg\Notifications\Notification$return_valuecurrent notification content
array$paramssupplied params
Returns
void|

Definition at line 1023 of file admin.php.

_elgg_admin_upgrades_menu ( \Elgg\Hook  $hook)

Add menu items to the filter menu on the admin upgrades page.

Parameters
\Elgg\Hook$hook'register', 'menu:filter:admin/upgrades'
Returns
MenuItems

Definition at line 1066 of file admin.php.

_elgg_admin_user_unvalidated_bulk_menu ( \Elgg\Hook  $hook)

Register menu items to the bulk actions for unvalidated users.

register menu:user:unvalidated:bulk

Parameters
\Elgg\Hook$hook'register' 'menu:user:unvalidated:bulk'
Returns
void|ElggMenuItem[]
Since
3.0

Definition at line 552 of file admin.php.

_elgg_ajax_plugins_update ( )

Returns plugin listing and admin menu to the client (used after plugin (de)activation)

Definition at line 198 of file admin.php.

_elgg_create_notice_of_pending_upgrade (   $event,
  $type,
  $object 
)

Add an admin notice when a new object is created.

Parameters
string$event'create'
string$type'object'
\ElggObject$objectthe created object
Returns
void

Definition at line 110 of file admin.php.

elgg_add_admin_notice (   $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
ElggObject|bool
Since
1.8.0

Definition at line 59 of file admin.php.

elgg_admin_notice_exists (   $id)

Check if an admin notice is currently active.

(Ignores access)

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

Definition at line 95 of file admin.php.

elgg_delete_admin_notice (   $id)

Remove an admin notice by ID.

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

Definition at line 71 of file admin.php.

elgg_get_admin_notices ( 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
Since
1.8.0

Definition at line 83 of file admin.php.

elgg_get_admins ( array  $options = [])

Get the admin users.

Parameters
array$optionsOptions array,
See also
elgg_get_entities() for parameters
Returns
mixed Array of admin users or false on failure. If a count, returns int.
Since
1.8.0

Definition at line 34 of file admin.php.

Variable Documentation

See also
::loadCore Do not do work here. Just register for events.

Definition at line 1102 of file admin.php.