aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-11 13:15:36 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-11 13:15:36 +0000
commit33cfe143311844cbde22177e07e4f1742bb04e25 (patch)
tree2d5dcd18b567cc17276eb687c859d3eb92d21988
parentc0a40dd798f5604e60eb1c4b6e9a618d312fd993 (diff)
downloadelgg-33cfe143311844cbde22177e07e4f1742bb04e25.tar.gz
elgg-33cfe143311844cbde22177e07e4f1742bb04e25.tar.bz2
git-svn-id: https://code.elgg.org/elgg/trunk@866 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/admin.php13
-rw-r--r--engine/lib/elgglib.php2
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) {