Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Reaction::UI::ControllUserRContributed:PerlCDocumller::Role::Action::Create(3)

NAME
       Reaction::UI::Controller::Role::Action::Create -	Create action

DESCRIPTION
       Provides	a "create" 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".

SYNOPSYS
	   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::Create'
	   );

	   __PACKAGE__->config(	action => {
	     create => { Chained => 'base' },
	   } );

	   sub base :Chained('/base') :CaptureArgs(0) {
	     ...
	   }

	   sub on_create_apply_callback{ #optional callback
	     my($self, $c, $vp,	$result) = @_;
	     ...
	   }

	   sub on_create_close_callback{ #optional callback
	     my($self, $c, $vp)	= @_;
	     ...
	   }

ROLES CONSUMED
       This role also consumes the following roles:

       Reaction::UI::Controller::Role::Action::Simple

REQUIRED METHODS
       The following methods must be provided by the consuming class:

       "get_collection"
       "make_context_closure"

ACTIONS
   create
       Chain endpoint with no args, sets up the	viewport with the appropriate
       action.	If the methods "on_create_apply_callback" and
       "on_create_close_callback" are present in the consuming class, they
       will be used as callbacks in the	viewport.

METHODS
   _build_action_viewport_map
       Extends to set the "create" key in the map to
       Reaction::UI::ViewPort::Action

SEE ALSO
       Reaction::UI::Controller
       Reaction::UI::Controller::Role::GetCollection
       Reaction::UI::Controller::Role::Action::Simple
       Reaction::UI::Controller::Role::Action::List
       Reaction::UI::Controller::Role::Action::View
       Reaction::UI::Controller::Role::Action::Object
       Reaction::UI::Controller::Role::Action::Update
       Reaction::UI::Controller::Role::Action::Delete
       Reaction::UI::Controller::Role::Action::DeleteAll

AUTHORS
       See Reaction::Class for authors.

LICENSE
       See Reaction::Class for the license.

POD ERRORS
       Hey! The	above document had some	coding errors, which are explained
       below:

       Around line 81:
	   Unknown directive: =over4

       Around line 83:
	   '=item' outside of any '=over'

       Around line 91:
	   Unknown directive: =over4

       Around line 93:
	   '=item' outside of any '=over'

       Around line 115:
	   Unknown directive: =over4

       Around line 117:
	   '=item' outside of any '=over'

perl v5.24.1		     Reaction::UI::Controller::Role::Action::Create(3)

NAME | DESCRIPTION | SYNOPSYS | ROLES CONSUMED | REQUIRED METHODS | ACTIONS | METHODS | SEE ALSO | AUTHORS | LICENSE | POD ERRORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Reaction::UI::Controller::Role::Action::Create&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help