sub begin :Private
{
- $DB::single = 1;
my ($self, $c) = @_;
Catalyst::Controller::DBIC::API::Request->meta->apply($c->req)
sub setup :Chained('specify.in.subclass.config') :CaptureArgs(0) :PathPart('specify.in.subclass.config')
{
- $DB::single = 1;
my ($self, $c) = @_;
$c->req->_set_current_result_set($self->stored_result_source->resultset);
sub deserialize :ActionClass('Deserialize')
{
- $DB::single = 1;
my ($self, $c) = @_;
my $req_params;
sub inflate_request
{
- $DB::single = 1;
my ($self, $c, $params) = @_;
try
sub list :Private
{
- $DB::single = 1;
my ($self, $c) = @_;
$self->list_munge_parameters($c);
sub list_perform_search
{
- $DB::single = 1;
my ($self, $c) = @_;
try
sub list_format_output
{
- $DB::single = 1;
my ($self, $c) = @_;
my $rs = $c->req->current_result_set->search;
foreach my $row ($rs->all)
{
- push(@$formatted, $self->row_format_output($row));
+ push(@$formatted, $self->row_format_output($c, $row));
}
$output->{$self->data_root} = $formatted;
=method_protected row_format_output
-row_format_output is called each row of the inflated output generated from the search. It receives only one argument, the hashref that represents the row. By default, this method is merely a passthrough.
+row_format_output is called each row of the inflated output generated from the search. It receives two arguments, the catalyst context and the hashref that represents the row. By default, this method is merely a passthrough.
=cut
-sub row_format_output { shift; shift; } # passthrough by default
+sub row_format_output
+{
+ my ($self, $c, $row) = @_;
+ return $row; # passthrough by default
+}
=method_protected update_or_create
sub update_or_create :Private
{
- $DB::single = 1;
my ($self, $c) = @_;
if($c->req->has_objects)
sub transact_objects
{
- $DB::single = 1;
my ($self, $c, $coderef) = @_;
try
sub validate_objects
{
- $DB::single = 1;
my ($self, $c) = @_;
try
sub validate_object
{
- $DB::single = 1;
my ($self, $c, $obj) = @_;
my ($object, $params) = @$obj;
sub delete :Private
{
- $DB::single = 1;
my ($self, $c) = @_;
if($c->req->has_objects)
sub end :Private
{
- $DB::single = 1;
my ($self, $c) = @_;
# check for errors
}
elsif($self->return_object && $c->req->has_objects)
{
- $DB::single = 1;
my $returned_objects = [];
push(@$returned_objects, $self->each_object_inflate($c, $_)) for map { $_->[0] } $c->req->all_objects;
$c->stash->{response}->{$self->data_root} = scalar(@$returned_objects) > 1 ? $returned_objects : $returned_objects->[0];