diff options
-rw-r--r-- | engine/lib/admin.php | 13 | ||||
-rw-r--r-- | engine/lib/elgglib.php | 2 |
2 files changed, 12 insertions, 3 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) { } diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index e7e3abc12..092330328 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -278,7 +278,7 @@ * Extends a view by adding other views to be displayed at the same time.
*
* @param string $view The view to add to.
- * @param string $view_name The name of the view to extend
+ * @param string $view_name The name of the view to extend with
* @param int $priority The priority, from 0 to 1000, to add at (lowest numbers will be displayed first)
*/
function extend_view($view, $view_name, $priority = 501) {
|