|
Lines 125-130
sub build {
Link Here
|
| 125 |
}); |
125 |
}); |
| 126 |
} |
126 |
} |
| 127 |
|
127 |
|
|
|
128 |
sub gimme_a_biblio { |
| 129 |
my ( $self, $args ) = @_; |
| 130 |
|
| 131 |
my $itemtype = $args->{itemtype} || $self->build_object({ class => 'Koha::ItemTypes' })->itemtype; |
| 132 |
my $title = $args->{title} || 'Some boring read'; |
| 133 |
|
| 134 |
my $record = MARC::Record->new(); |
| 135 |
$record->append_fields( |
| 136 |
MARC::Field->new( '245', ' ', ' ', a => $title ), |
| 137 |
MARC::Field->new( '942', ' ', ' ', c => $itemtype ) |
| 138 |
); |
| 139 |
|
| 140 |
my ($biblio_id) = AddBiblio( $record, '' ); |
| 141 |
return Koha::Biblios->find($biblio_id); |
| 142 |
} |
| 143 |
|
| 128 |
# ------------------------------------------------------------------------------ |
144 |
# ------------------------------------------------------------------------------ |
| 129 |
# Internal helper routines |
145 |
# Internal helper routines |
| 130 |
|
146 |
|
| 131 |
- |
|
|