|
Lines 210-228
sub build_sample_item {
Link Here
|
| 210 |
)->store->get_from_storage; |
210 |
)->store->get_from_storage; |
| 211 |
} |
211 |
} |
| 212 |
|
212 |
|
|
|
213 |
=pod |
| 214 |
|
| 215 |
=head2 build_sample_ill_request |
| 216 |
|
| 217 |
Builds a sample ILL request with the supplied arguments. |
| 218 |
|
| 219 |
C<$args> is a hashref with the following optional keys: |
| 220 |
|
| 221 |
=over 4 |
| 222 |
|
| 223 |
=item * C<biblio_id> (default: a new sample biblio created with L<build_sample_biblio>) |
| 224 |
|
| 225 |
=item * C<backend> (default: Standard) |
| 226 |
|
| 227 |
=item * C<branchcode> (default: a random branch) |
| 228 |
|
| 229 |
=back |
| 230 |
|
| 231 |
=cut |
| 213 |
sub build_sample_ill_request { |
232 |
sub build_sample_ill_request { |
| 214 |
my ( $self, $args ) = @_; |
233 |
my ( $self, $args ) = @_; |
| 215 |
|
234 |
|
| 216 |
$args->{biblio_id} = $args->{biblio_id} || $self->build_sample_biblio->biblionumber; |
235 |
$args->{biblio_id} = $args->{biblio_id} || $self->build_sample_biblio->biblionumber; |
| 217 |
$args->{backend} = $args->{backend} || 'FreeForm'; |
236 |
$args->{backend} = $args->{backend} || 'Standard'; |
| 218 |
$args->{branchcode} = $args->{branchcode} || $self->build_object( { class => 'Koha::Libraries' } )->branchcode; |
237 |
$args->{branchcode} = $args->{branchcode} || $self->build_object( { class => 'Koha::Libraries' } )->branchcode; |
| 219 |
|
238 |
|
| 220 |
return $self->build( |
239 |
return $self->build_object( |
| 221 |
{ |
240 |
{ |
| 222 |
source => 'Illrequest', |
241 |
class => 'Koha::ILL::Requests', |
| 223 |
value => $args, |
242 |
value => $args, |
| 224 |
} |
243 |
} |
| 225 |
); |
244 |
)->store->get_from_storage; |
| 226 |
} |
245 |
} |
| 227 |
|
246 |
|
| 228 |
# ------------------------------------------------------------------------------ |
247 |
# ------------------------------------------------------------------------------ |
| 229 |
- |
|
|