From b4f1281799766570ff68580e13c588ea8c8ce1f1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 7 Mar 2011 12:36:45 -0500 Subject: [PATCH] abstraction for starting and ending a menu --- lib/menu.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/menu.php b/lib/menu.php index 2713b44d50..751f8e1b7d 100644 --- a/lib/menu.php +++ b/lib/menu.php @@ -62,6 +62,23 @@ class Menu extends Widget $this->actionName = $action->trimmed('action'); } + function id() + { + return 'unknown_menu'; + } + + function menuStart() + { + $this->action->elementStart('div', array('id' => $this->id())); + $this->action->elementStart('ul', array('class' => 'nav')); + } + + function menuEnd() + { + $this->action->elementEnd('ul'); + $this->action->elementEnd('div'); + } + function item($actionName, $args, $label, $description, $id=null) { if (empty($id)) { -- 2.39.5