public function render() { $ul = $this->root_entry->renderChildren(); $ul->attributes = array_merge($ul->attributes, $this->menu_attribs); return $ul; }
/** * @param $display The text to be displayed. * @param $id A unique id for this menu entry that can be used to reference it. * @return SmartMenuEntry */ public function createEntry($display, $id = null) { $entry = new SmartMenuEntry(); $entry->setDisplay($display); if ($id !== null) { $this->children[$id] = $entry; } else { $this->children[] = $entry; } return $entry; }