Reaction::UI::Controller::Role::Action::DeleteAll - Delete All action
Provides a delete_all action, which sets up an Action Viewport by calling action_for on either the object located in the collection slot of the stash or on the object returned by the method get_collection.
delete_all
action_for
collection
stash
get_collection
package MyApp::Controller::Foo; use base 'Reaction::Controller'; use Reaction::Class; with( 'Reaction::UI::Controller::Role::GetCollection', 'Reaction::UI::Controller::Role::Action::Simple', 'Reaction::UI::Controller::Role::Action::DeleteAll' ); __PACKAGE__->config( action => { delete_all => { Chained => 'base' }, } ); sub base :Chained('/base') :CaptureArgs(0) { ... } sub on_delete_all_apply_callback{ #optional callback my($self, $c, $vp, $result) = @_; ... } sub on_delete_all_close_callback{ #optional callback my($self, $c, $vp) = @_; ... }
This role also consumes the following roles:
The following methods must be provided by the consuming class:
make_context_closure
Chain endpoint with no args, sets up the viewport with the appropriate action. If the methods on_delete_all_apply_callback and on_delete_all_close_callback are present in the consuming class, they will be used as callbacks in the viewport.
on_delete_all_apply_callback
on_delete_all_close_callback
Extends to set the delete_all key in the map to Reaction::UI::ViewPort::Action
See Reaction::Class for authors.
See Reaction::Class for the license.
6 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.