aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggMenuItem.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 18:48:40 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-13 18:48:40 +0000
commitcaf76cbe72ca6749962a1feddfd70bdd29483c36 (patch)
treec25cc57270602691f3cb756f98e6a17001779d89 /engine/classes/ElggMenuItem.php
parentac39d8a06f422887cf256d77a096c03783dd349e (diff)
downloadelgg-caf76cbe72ca6749962a1feddfd70bdd29483c36.tar.gz
elgg-caf76cbe72ca6749962a1feddfd70bdd29483c36.tar.bz2
admin menu uses weights for ordering
git-svn-id: http://code.elgg.org/elgg/trunk@8201 36083f99-b078-4883-b0ff-0f9b5a30f544
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