From: Evan Prodromou Date: Mon, 7 Mar 2011 17:36:45 +0000 (-0500) Subject: abstraction for starting and ending a menu X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b4f1281799766570ff68580e13c588ea8c8ce1f1;p=quix0rs-gnu-social.git abstraction for starting and ending a menu --- 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)) {