]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
abstraction for starting and ending a menu
authorEvan Prodromou <evan@status.net>
Mon, 7 Mar 2011 17:36:45 +0000 (12:36 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 7 Mar 2011 17:36:45 +0000 (12:36 -0500)
lib/menu.php

index 2713b44d50e8e8c86d722fc15c22b75a881b1d0a..751f8e1b7d9bd8c1ba7766505ccfbd7e41f1153c 100644 (file)
@@ -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)) {