Reaction::UI::Controller::Role::Action::Simple
Provides a setup_viewport method, which makes it easier to setup and configure a viewport in controller actions.
setup_viewport
package MyApp::Controller::Foo; use base 'Reaction::Controller'; use Reaction::Class; with 'Reaction::UI::Controller::Role::Action::Simple'; __PACKAGE__->config( action_viewport_map => { bar => 'Reaction::UI::Viewport::Object' }, action_viewport_args => { location => 'custom-location' }, ); sub bar :Local { my($self, $c) = @_; my $obj = $self->get_collection($c)->find( $some_key ); $self->setup_viewport($c, { model => $obj }); }
Read-write lazy building hashref. The keys should match action names in the Controller and the value should be the ViewPort class that this action should use.
Read-write lazy building hashref. Additional ViewPort arguments for the action named as the key in the controller.
Accepts two arguments, context, and a hashref of viewport arguments. It will automatically determine the action name using the catalyst stack and call push_viewport with the ViewPort class name contained in the action_viewport_map with a set of options determined by merging $vp_args and the arguments contained in action_viewport_args, if any.
push_viewport
action_viewport_map
$vp_args
action_viewport_args
See Reaction::Class for authors.
See Reaction::Class for the license.
2 POD Errors
The following errors were encountered while parsing the POD:
Unknown directive: =over4
'=item' outside of any '=over'
To install Reaction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Reaction
CPAN shell
perl -MCPAN -e shell install Reaction
For more information on module installation, please visit the detailed CPAN module installation guide.