NAME
CatalystX::Resource::Controller::Resource - Base Controller for Resources
VERSION
version 0.001_004
ATTRIBUTES
model
required, the DBIC model associated with this resource. (e.g.: 'DB::CDs')
resultset_key
stash key used to store the resultset of this resource. (e.g.: 'cds_rs')
resources_key
stash key used to store all results of this resource. (e.g.: 'tracks') You will need this to access a list of your resources in your template.
resource_key
stash key used to store specific result of this resource. (e.g.: 'track') You will need this to access your resource in your template.
parent_key
for a nested resource 'parent_key' is used as stash key to store the parent item (e.g.: 'cd') this is required if parent_key is set
parents_accessor
the accessor on the parent resource to get a resultset of this resource (accessor in DBIC has_many) (e.g.: 'tracks') this is required if parent_key is set
redirect_mode list|show|show_parent
After a created/edit/delete action a redirect takes place. The redirect behavior can be controlled with the redirect_mode attribute.
default = 'list'
METHODS
_redirect
redirect request after create/edit/delete/move_next/move_previous
_msg
returns notification msg to be displayed
_name
get a meaningful name for the resource
ACTIONS
the following actions will be loaded
base
Starts a chain and puts resultset into stash
For nested resources chain childrens 'base' action to parents 'base_with_id' action
base_with_id
chains to 'base' and puts resource with id into stash
AUTHOR
David Schmidt <davewood@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by David Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.