![]() |
![]()
| ![]() |
![]()
NAMEReaction::UI::Controller::Role::Action::DeleteAll - Delete All action DESCRIPTIONProvides 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". SYNOPSYSpackage 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) = @_; ... } ROLES CONSUMEDThis role also consumes the following roles: REQUIRED METHODSThe following methods must be provided by the consuming class:
ACTIONSdelete_allChain 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. METHODS_build_action_viewport_mapExtends to set the "delete_all" key in the map to Reaction::UI::ViewPort::Action SEE ALSO
AUTHORSSee Reaction::Class for authors. LICENSESee Reaction::Class for the license. POD ERRORSHey! The above document had some coding errors, which are explained below:
|