aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggMenuItem.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-24 01:46:08 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-24 01:46:08 +0000
commit2aa481c0ac877eacf643cd71c5701c1c271140da (patch)
tree8502b3be1c16cdbfa655ec96c2da378f7ed05cf9 /engine/classes/ElggMenuItem.php
parentc667ce609dc3c1f9f071e39293f8c176d3e1c5dc (diff)
downloadelgg-2aa481c0ac877eacf643cd71c5701c1c271140da.tar.gz
elgg-2aa481c0ac877eacf643cd71c5701c1c271140da.tar.bz2
Fixes #2997 - href used instead of url in menu system
git-svn-id: http://code.elgg.org/elgg/trunk@8456 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggMenuItem.php')
-rw-r--r--engine/classes/ElggMenuItem.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index 0a1b948cc..8bff0abba 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -21,7 +21,7 @@ class ElggMenuItem {
/**
* @var string The menu url
*/
- protected $url = null;
+ protected $href = null;
/**
* @var array Classes to apply to the anchor tag.
@@ -78,13 +78,13 @@ class ElggMenuItem {
*
* @param string $name Identifier of the menu item
* @param string $text Display text of the menu item
- * @param string $url URL of the menu item
+ * @param string $href URL of the menu item
*/
- public function __construct($name, $text, $url) {
+ public function __construct($name, $text, $href) {
$this->name = $name;
$this->text = $text;
- if ($url) {
- $this->url = elgg_normalize_url($url);
+ if ($href) {
+ $this->href = elgg_normalize_url($href);
}
}
@@ -92,7 +92,7 @@ class ElggMenuItem {
* ElggMenuItem factory method
*
* This static method creates an ElggMenuItem from an associative array.
- * Required keys are name, title, and url.
+ * Required keys are name, text, and href.
*
* @param array $options Option array of key value pairs
*
@@ -103,10 +103,10 @@ class ElggMenuItem {
return NULL;
}
- $item = new ElggMenuItem($options['name'], $options['text'], $options['url']);
+ $item = new ElggMenuItem($options['name'], $options['text'], $options['href']);
unset($options['name']);
unset($options['text']);
- unset($options['url']);
+ unset($options['href']);
// special catch in case someone uses context rather than contexts
if (isset($options['context'])) {
@@ -149,8 +149,8 @@ class ElggMenuItem {
*
* @return string
*/
- public function getURL() {
- return $this->url;
+ public function getHref() {
+ return $this->href;
}
/**
@@ -409,8 +409,8 @@ class ElggMenuItem {
*/
public function getLink(array $vars = array()) {
$vars['text'] = $this->text;
- if ($this->url) {
- $vars['href'] = $this->url;
+ if ($this->href) {
+ $vars['href'] = $this->href;
}
if ($this->linkClass) {
$vars['class'] = $this->linkClass;