aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
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);
}
}