Koha::Biblio - Koha Biblio Object class
Overloaded store method to set default values
my $metadata = $biblio->metadata();
Returns a Koha::Biblio::Metadata object
my $orders = $biblio->orders();
Returns a Koha::Acquisition::Orders object
my $active_orders = $biblio->active_orders();
Returns the active acquisition orders related to this biblio. An order is considered active when it is not cancelled (i.e. when datecancellation is not undef).
my $bool = $biblio->can_article_request( $borrower );
Returns true if article requests can be made for this record
$borrower must be a Koha::Patron object
$biblio->can_be_transferred({ to => $to_library, from => $from_library })
Checks if at least one item of a biblio can be transferred to given library.
This feature is controlled by two system preferences: UseBranchTransferLimits to enable / disable the feature BranchTransferLimitsType to use either an itemnumber or ccode as an identifier for setting the limitations
Performance-wise, it is recommended to use this method for a biblio instead of iterating each item of a biblio with Koha::Item->can_be_transferred().
Takes HASHref that can have the following parameters: MANDATORY PARAMETERS: $to : Koha::Library OPTIONAL PARAMETERS: $from : Koha::Library # if given, only items from that # holdingbranch are considered
Returns 1 if at least one of the item of a biblio can be transferred to $to_library, otherwise 0.
my $pickup_locations = $biblio->pickup_locations( {patron => $patron } );
Returns a Koha::Libraries set of possible pickup locations for this biblio's items, according to patron's home library (if patron is defined and holds are allowed only from hold groups) and if item can be transferred to each pickup location.
my $bool = $biblio->hidden_in_opac({ [ rules => $rules ] })
Returns true if the biblio matches the hidding criteria defined in $rules. Returns false otherwise.
Takes HASHref that can have the following parameters: OPTIONAL PARAMETERS: $rules : { <field> => [ value_1, ... ], ... }
Note: $rules inherits its structure from the parsed YAML from reading the OpacHiddenItems system preference.
my $type = $biblio->article_request_type( $borrower );
Returns the article request type based on items, or on the record itself if there are no items.
$borrower must be a Koha::Patron object
my $type = $biblio->article_request_type_for_bib
Returns the article request type 'yes', 'no', 'item_only', 'bib_only', for the given record
my $type = $biblio->article_request_type_for_items
Returns the article request type 'yes', 'no', 'item_only', 'bib_only', for the given record's items
If there is a conflict where some items are 'bib_only' and some are 'item_only', 'bib_only' will be returned.
my @requests = $biblio->article_requests
Returns the article requests associated with this Biblio
my @requests = $biblio->article_requests_current
Returns the article requests associated with this Biblio that are incomplete
my @requests = $biblio->article_requests_finished
Returns the article requests associated with this Biblio that are completed
my $items = $biblio->items();
Returns the related Koha::Items object for this biblio
my $itemtype = $biblio->itemtype();
Returns the itemtype for this record.
my $holds = $biblio->holds();
return the current holds placed on this record
my $holds = $biblio->current_holds
Return the holds placed on this bibliographic record. It does not include future holds.
my $field = $self->biblioitem()->itemtype
Returns the related Koha::Biblioitem object for this Biblio object
my $suggestions = $self->suggestions
Returns the related Koha::Suggestions object for this Biblio object
my $subscriptions = $self->subscriptions
Returns the related Koha::Subscriptions object for this Biblio object
my $itemsWaitingOrInTransit = $biblio->has_items_waiting_or_intransit
Tells if this bibliographic record has items waiting or in transit.
my $coins = $biblio->get_coins;
Returns the COinS (a span) which can be included in a biblio record
my $url = $biblio->get_openurl;
Returns url for OpenURL resolver set in OpenURLResolverURL system preference
my $serial = $biblio->is_serial
Return boolean true if this bibbliographic record is continuing resource
my $image_url = $biblio->custom_cover_image_url
Return the specific url of the cover image for this bibliographic record. It is built regaring the value of the system preference CustomCoverImagesURL
Return the cover images associated with this biblio.
my $json = $biblio->to_api;
Overloaded method that returns a JSON representation of the Koha::Biblio object, suitable for API output. The related Koha::Biblioitem object is merged as expected on the API.
This method returns the mapping for representing a Koha::Biblio object on the API.
Kyle M Hall <kyle@bywatersolutions.com>