]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
method to show submenus
authorEvan Prodromou <evan@status.net>
Tue, 1 Mar 2011 11:29:24 +0000 (06:29 -0500)
committerEvan Prodromou <evan@status.net>
Tue, 1 Mar 2011 11:29:24 +0000 (06:29 -0500)
lib/menu.php

index b9791d2359f1c388281cb5ea5d2d33f8694be6bb..7947b4d7e4e14b3d65bb4016c929259d664146d0 100644 (file)
@@ -81,4 +81,12 @@ class Menu extends Widget
     {
         return sprintf('nav_%s', $actionName);
     }
+
+    function submenu($label, $menu)
+    {
+        $this->action->elementStart('li');
+        $this->action->text($label);
+        $menu->show();
+        $this->action->elementEnd('li');
+    }
 }