public function getData($key)
{
if (isset($this->data[$key])) {
return $this->data[$key];
} else {
return null;
}
}
/** * Compare two menu items by their priority * * @param ElggMenuItem $a Menu item * @param ElggMenuItem $b Menu item * @return bool * * @todo change name to compareByPriority */ public static function compareByWeight($a, $b) { $aw = $a->getWeight(); $bw = $b->getWeight(); if ($aw == $bw) { return $a->getData('original_order') - $b->getData('original_order'); } return $aw - $bw; }