<<

NAME

Koha::Object::Limit::Library - Generic library limit handling class

SYNOPSIS

    use base qw(Koha::Object Koha::Object::Limit::Library);
    my $object = Koha::Object->new({ property1 => $property1, property2 => $property2, etc... } );

DESCRIPTION

This class is provided as a generic way of handling library limits for Koha::Object-based classes in Koha.

This class must always be subclassed.

API

Class Methods

library_limits

my $limits = $object->library_limits();

$object->library_limits( \@branchcodes );

Accessor method for library limits. When updating library limits, it accepts a list of branchcodes. If requested to return the current library limits it returns a Koha::Libraries object with the corresponding libraries.

get_library_limits

my $limits = $object->get_library_limits();

Returns the current library limits in the form of a Koha::Libraries iterator object. It returns undef if no library limits defined.

add_library_limit

$object->add_library_limit( $branchcode );

del_library_limit

$object->del_library_limit( $branchcode );

replace_library_limits

$object->replace_library_limits( \@branchcodes );

Koha::Objects->_library_limit_rs

Returns the internal resultset for the branch limitation table or creates it if undefined

<<