| 1 | #package ETLp::Role::Browser; | ||
| 2 | |||
| 3 | use MooseX::Declare; | ||
| 4 | =head1 NAME | ||
| 5 | |||
| 6 | ETLp::Role::Browser - utility methods for the audir owser | ||
| 7 | |||
| 8 | =head1 DESCRIPTION | ||
| 9 | |||
| 10 | This role provides a attributes and methods for the audit browser - | ||
| 11 | specifically the models | ||
| 12 | |||
| 13 | =head1 ATTRIBUTES | ||
| 14 | |||
| 15 | =head2 pagesize | ||
| 16 | |||
| 17 | The number of elements to put on a page. Defaults to 10 | ||
| 18 | |||
| 19 | =head1 METHODS | ||
| 20 | |||
| 21 | =head2 get_status_list | ||
| 22 | |||
| 23 | Returns a list of all possible statuses as a DBIx::Class resultset | ||
| 24 | |||
| 25 | =cut | ||
| 26 | role ETLp::Role::Browser { | ||
| 27 | has 'pagesize' => (is => 'rw', isa => 'Int', required => 0, default => 10); | ||
| 28 | |||
| 29 | method get_status_list { | ||
| 30 | return $self->EtlpStatus()->search(undef, {order_by => 'status_name'}); | ||
| 31 | } | ||
| 32 | } |