diff options
author | purge <purge@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-09-17 14:21:58 +0000 |
---|---|---|
committer | purge <purge@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-09-17 14:21:58 +0000 |
commit | a841aae8c18238dc34d87e5eda150ab2f0770475 (patch) | |
tree | 061c3ef32fc8effca98d08ccf2ca7f6033e9cd02 /lib | |
parent | 28d2d47d3d0780bf8a8841f6168cec263900ed8e (diff) | |
download | reaction-a841aae8c18238dc34d87e5eda150ab2f0770475.tar.gz reaction-a841aae8c18238dc34d87e5eda150ab2f0770475.zip |
pass through layout_args to actions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Reaction/UI/ViewPort/Role/Actions.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Reaction/UI/ViewPort/Role/Actions.pm b/lib/Reaction/UI/ViewPort/Role/Actions.pm index 32c7bbb..89b5ae3 100644 --- a/lib/Reaction/UI/ViewPort/Role/Actions.pm +++ b/lib/Reaction/UI/ViewPort/Role/Actions.pm @@ -62,12 +62,14 @@ sub _build_actions { my $uri = $proto->{uri} or confess('uri is required in prototype action'); my $label = exists $proto->{label} ? $proto->{label} : $proto_name; my $layout = exists $proto->{layout} ? $proto->{layout} : 'uri'; + my $layout_args = exists $proto->{layout_args} ? $proto->{layout_args} : {}; my $action = Reaction::UI::ViewPort::URI->new( location => join ('-', $loc, 'action', $i++), uri => ( ref($uri) eq 'CODE' ? $uri->($target, $ctx) : $uri ), display => ( ref($label) eq 'CODE' ? $label->($target, $ctx) : $label ), layout => ( ref($layout) eq 'CODE' ? $layout->($target, $ctx) : $layout ), + layout_args => ( ref($layout_args) eq 'CODE' ? $layout_args->($target, $ctx) : $layout_args ), ); push(@act, $action); } |