diff options
Diffstat (limited to 'engine/lib/admin.php')
-rw-r--r-- | engine/lib/admin.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 5e3358078..97b6d9eeb 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -14,11 +14,20 @@ /** * Register an admin page with the admin panel. + * This function extends the view "admin/main" with the provided view. This view should provide a description + * and either a control or a link to. * - * @param string $view The view associated with the page, this is assumed to be under the view /admin/. + * Usage: + * - To add a control to the main admin panel then extend admin/main + * - To add a control to a new page create a page which renders a view admin/subpage (where subpage is your new page - + * nb. some pages already exist that you can extend), extend the main view to point to it, and add controls to your + * new view. + * + * @param string $view The view to extend, by default this is 'admin/main'. + * @param string $new_admin_view The view body associated with the page. * @param int $priority Optional priority to govern the appearance in the list. */ - function register_elgg_admin_page($view, $priority = 500) + function extend_elgg_admin_page($view = 'admin/main', $new_admin_view, $priority = 500) { } |