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.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index a190a89ef..108cb56f2 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -39,6 +39,11 @@ class ElggMenuItem {
protected $tooltip = '';
/**
+ * @var int Menu weight - smaller weights float to the top
+ */
+ protected $weight = 100;
+
+ /**
* @var bool Is this the currently selected menu item
*/
protected $selected = false;
@@ -227,6 +232,26 @@ class ElggMenuItem {
}
/**
+ * Set the weight of the menu item
+ *
+ * @param int $weight The lower weight items float to the top of the menu
+ *
+ * @return void
+ */
+ public function setWeight($weight) {
+ $this->weight = $weight;
+ }
+
+ /**
+ * Get the weight of the menu item
+ *
+ * @return int
+ */
+ public function getWeight() {
+ return $this->weight;
+ }
+
+ /**
* Set the section identifier
*
* @param string $section The identifier of the section