aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-27 14:20:22 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-27 14:20:22 +0000
commit4c94f8809f1131e2d8e073518195b6b65b26aceb (patch)
tree461af7e0e4414871c519acdef84ce397fa534325 /engine/classes
parent543e50d2aabfbd3c116cbb670018c66fae535955 (diff)
downloadelgg-4c94f8809f1131e2d8e073518195b6b65b26aceb.tar.gz
elgg-4c94f8809f1131e2d8e073518195b6b65b26aceb.tar.bz2
improved menu creation for on demand menus and integrated hover menu items into profile owner block
git-svn-id: http://code.elgg.org/elgg/trunk@7724 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggMenuBuilder.php6
-rw-r--r--engine/classes/ElggMenuItem.php11
2 files changed, 7 insertions, 10 deletions
diff --git a/engine/classes/ElggMenuBuilder.php b/engine/classes/ElggMenuBuilder.php
index b57ea6e18..3528eaef8 100644
--- a/engine/classes/ElggMenuBuilder.php
+++ b/engine/classes/ElggMenuBuilder.php
@@ -18,10 +18,8 @@ class ElggMenuBuilder {
*
* @param string $name Identifier of the menu
*/
- public function __construct($name) {
- global $CONFIG;
-
- $this->menu = $CONFIG->menus[$name];
+ public function __construct($menu) {
+ $this->menu = $menu;
}
/**
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index f2eb1534f..2205ebc89 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -318,15 +318,14 @@ class ElggMenuItem {
/**
* Get the menu link
*
- * @todo add styling
+ * @params array $vars Options to pass to output/url
*
* @return string
*/
- public function getLink() {
- $vars = array(
- 'href' => $this->url,
- 'text' => $this->title
- );
+ public function getLink(array $vars = array()) {
+ $vars['href'] = $this->url;
+ $vars['text'] = $this->title;
+
return elgg_view('output/url', $vars);
}
}