aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/views.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 22:06:28 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-26 22:06:28 +0000
commitc80487eb37d735f83e25c5cb86e504e2e4b66b76 (patch)
tree2c3b73708aab43b0e66f308adab080cf79d5dcd4 /engine/lib/views.php
parentc91d28a163e75bdea02a9ddbc19649b06654da0d (diff)
downloadelgg-c80487eb37d735f83e25c5cb86e504e2e4b66b76.tar.gz
elgg-c80487eb37d735f83e25c5cb86e504e2e4b66b76.tar.bz2
Fixes #3026 documentation for menu system
git-svn-id: http://code.elgg.org/elgg/trunk@8857 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r--engine/lib/views.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index d3d790f8b..442f777f6 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -678,13 +678,28 @@ function elgg_view_layout($layout_name, $vars = array()) {
/**
* Render a menu
*
+ * @see elgg_register_menu_item() for documentation on adding menu items and
+ * navigation.php for information on the different menus available.
+ *
+ * This function triggers a 'register', 'menu:<menu name>' plugin hook that enables
+ * plugins to add menu items just before a menu is rendered. This is used by
+ * context-sensitive menus (menus that are specific to a particular entity such
+ * as the user hover menu). Using elgg_register_menu_item() in response to the hook
+ * can cause incorrect links to show up. See the blog plugin's blog_owner_block_menu()
+ * for an example of using this plugin hook.
+ *
+ * An additional hook is the 'prepare', 'menu:<menu name>' which enables plugins
+ * to modify the structure of the menu (sort it, remove items, set variables on
+ * the menu items).
+ *
+ * elgg_view_menu() uses views in navigation/menu
+ *
* @param string $menu_name The name of the menu
* @param array $vars An associative array of display options for the menu.
* Options include:
* sort_by => string or php callback
- * string options: 'name', 'title' (default), 'order' (registration order)
+ * string options: 'name', 'priority', 'title' (default), 'register' (registration order)
* php callback: a compare function for usort
- * priority: the order the items were registered
* handler: string the page handler to build action URLs
* entity: ElggEntity to use to build action URLs
* class: string the class for the entire menu.