Bigtop
view release on metacpan or search on metacpan
docs/keyword_cookbook/RPCSoap/Kids/lib/Kids/GEN/Child.pm view on Meta::CPAN
if ( $family ) {
$search->{ family } = $family;
}
my $schema = $self->get_schema();
my @rows = $CHILD->get_listing(
{
schema => $schema,
where => $search,
}
);
ROW:
foreach my $row ( @rows ) {
last ROW if $perm_obj->hide_all_data;
my $id = $row->id;
push(
@{ $retval->{rows} }, {
orm_row => $row,
data => [
$row->name,
$row->birth_day,
],
options => $perm_obj->real_row_options( $row ),
}
);
}
if ( $params->{ json } ) {
$self->template_disable( 1 );
my $obj = {
headings => $retval->{ headings },
header_options => $retval->{ header_options },
rows => $retval->{ rows },
};
my $json = to_json( $obj, { allow_blessed => 1 } );
return( $json );
}
$self->stash->view->data( $retval );
} # END do_main
#-----------------------------------------------------------------
# $self->form( $row )
#-----------------------------------------------------------------
sub form {
my ( $self, $row ) = @_;
my $selections = $CHILD->get_form_selections(
{ schema => $self->get_schema() }
);
return {
name => 'child',
row => $row,
legend => $self->path_info =~ /edit/i ? 'Edit' : 'Add',
fields => [
{
name => 'name',
label => 'Name',
type => 'text',
is => 'varchar',
},
{
date_select_text => 'Select Date',
name => 'birth_day',
label => 'Birth Day',
type => 'text',
is => 'date',
},
],
};
} # END form
1;
=head1 NAME
Kids::GEN::Child - generated support module for Kids::Child
=head1 SYNOPSIS
In Kids::Child:
use base 'Kids::GEN::Child';
=head1 DESCRIPTION
This module was generated by bigtop and IS subject to regeneration.
Use it in Kids::Child to provide the methods below.
Feel free to override them.
=head1 METHODS
=over 4
=item do_main
=item form
=back
=head1 AUTHOR
Generated by bigtop and subject to regeneration.
=cut
( run in 1.305 second using v1.01-cache-2.11-cpan-b16cb0d3907 )