diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-27 14:20:22 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-27 14:20:22 +0000 |
commit | 4c94f8809f1131e2d8e073518195b6b65b26aceb (patch) | |
tree | 461af7e0e4414871c519acdef84ce397fa534325 /engine/classes | |
parent | 543e50d2aabfbd3c116cbb670018c66fae535955 (diff) | |
download | elgg-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.php | 6 | ||||
-rw-r--r-- | engine/classes/ElggMenuItem.php | 11 |
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); } } |