|
Lines 598-603
For example, for holds, _type should return 'Reserve'.
Link Here
|
| 598 |
|
598 |
|
| 599 |
sub _type { } |
599 |
sub _type { } |
| 600 |
|
600 |
|
|
|
601 |
=head3 _polymorphic_field |
| 602 |
|
| 603 |
sub _polymorphic_field { |
| 604 |
return 'transport'; |
| 605 |
} |
| 606 |
|
| 607 |
The _polymorphic_field method must be set for all child classes that implement |
| 608 |
their own polymorphic children. |
| 609 |
|
| 610 |
It should return the field name that distinguishes the classes. |
| 611 |
|
| 612 |
=cut |
| 613 |
|
| 614 |
=head3 _polymorphic_map |
| 615 |
|
| 616 |
sub _polymorphic_map { |
| 617 |
return { |
| 618 |
sftp => 'Koha::File::Transport::SFTP', |
| 619 |
ftp => 'Koha::File::Transport::FTP', |
| 620 |
}; |
| 621 |
} |
| 622 |
|
| 623 |
The _polymorphic_map method must be implemented by all child classes that implement |
| 624 |
their own polymorphic children. |
| 625 |
|
| 626 |
It should return a simple hashmap mapping for field value to class name for the |
| 627 |
polymorphic class using the value from the _polymorphic_field defined above. |
| 628 |
|
| 629 |
=cut |
| 630 |
|
| 601 |
=head3 object_class |
631 |
=head3 object_class |
| 602 |
|
632 |
|
| 603 |
This method must be set for all child classes. |
633 |
This method must be set for all child classes. |
| 604 |
- |
|
|