Lines 47-59
sub new {
Link Here
|
47 |
my ( $class, $params ) = @_; |
47 |
my ( $class, $params ) = @_; |
48 |
|
48 |
|
49 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: patron") |
49 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: patron") |
50 |
unless $patron; |
50 |
unless $params->{patron}; |
51 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: library") |
51 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: library") |
52 |
unless $library; |
52 |
unless $params->{library}; |
53 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: item") |
53 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: item") |
54 |
unless $item; |
54 |
unless $params->{item}; |
55 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: to_date") |
55 |
Koha::Exceptions::MissingParameter->throw("Missing mandatory parameter: to_date") |
56 |
unless $to_date; |
56 |
unless $params->{to_date}; |
57 |
|
57 |
|
58 |
Carp::confess("Key 'patron' is not a Koha::Patron object!") |
58 |
Carp::confess("Key 'patron' is not a Koha::Patron object!") |
59 |
unless $params->{patron}->isa('Koha::Patron'); |
59 |
unless $params->{patron}->isa('Koha::Patron'); |
60 |
- |
|
|