[Jifty-commit] r4308 - in jifty/trunk: lib/Jifty/Web

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Oct 24 17:25:06 EDT 2007


Author: sartak
Date: Wed Oct 24 17:25:05 2007
New Revision: 4308

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Web/Menu.pm

Log:
 r44156 at onn:  sartak | 2007-10-24 17:24:51 -0400
 Add a hook to change a menu item's label 


Modified: jifty/trunk/lib/Jifty/Web/Menu.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Menu.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Menu.pm	Wed Oct 24 17:25:05 2007
@@ -33,6 +33,14 @@
 
 Sets or returns the string that the menu item will be displayed as.
 
+=cut
+
+sub label {
+    my $self = shift;
+    $self->{label} = shift if @_;
+    return $self->{label};
+}
+
 =head2 parent [MENU]
 
 Gets or sets the parent L<Jifty::Web::Menu> of this item; this defaults


More information about the Jifty-commit mailing list