aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggMenuItem.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggMenuItem.php')
-rw-r--r--engine/classes/ElggMenuItem.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index 8ddb1ecd8..62547134a 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -100,6 +100,9 @@ class ElggMenuItem {
if (!isset($options['name']) || !isset($options['text'])) {
return NULL;
}
+ if (!isset($options['href'])) {
+ $options['href'] = '';
+ }
$item = new ElggMenuItem($options['name'], $options['text'], $options['href']);
unset($options['name']);
@@ -412,6 +415,7 @@ class ElggMenuItem {
*
* @param int $priority The smaller numbers mean higher priority (1 before 100)
* @return void
+ * @deprecated
*/
public function setWeight($priority) {
$this->data['priority'] = $priority;
@@ -421,12 +425,32 @@ class ElggMenuItem {
* Get the priority of the menu item
*
* @return int
+ * @deprecated
*/
public function getWeight() {
return $this->data['priority'];
}
/**
+ * Set the priority of the menu item
+ *
+ * @param int $priority The smaller numbers mean higher priority (1 before 100)
+ * @return void
+ */
+ public function setPriority($priority) {
+ $this->data['priority'] = $priority;
+ }
+
+ /**
+ * Get the priority of the menu item
+ *
+ * @return int
+ */
+ public function getPriority() {
+ return $this->data['priority'];
+ }
+
+ /**
* Set the section identifier
*
* @param string $section The identifier of the section