<<

NAME

Koha::Object::Limit::LibraryGroup - Generic library group limit handling class

SYNOPSIS

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

DESCRIPTION

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

This class must always be subclassed .

API

Class Methods

library_group_limits

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

Returns an array reference of Koha::Library::Group objects representing the current library group limits: the root library groups that have the feature column enabled and contain at least one of the limited libraries, at any depth. A library group is the whole tree under such a root. Returns an empty array reference if no limits are defined.

ungrouped_library_limits

my $libraries = $object->ungrouped_library_limits();

Returns an array reference of Koha::Library objects for the library limits that are not members of any group returned by library_group_limits. Each of these libraries is enforced as a group of one. Returns an empty array reference if there are none.

library_group_limit_branchcodes

my $branchcodes = $object->library_group_limit_branchcodes();

Returns an array reference of every branchcode the library group limits resolve to: the branchcodes stored as limits plus every library in the groups returned by library_group_limits. Returns an empty array reference if no limits are defined. Use this for access checks.

_library_group_limit_branchcodes

Returns an array reference of the branchcodes stored in the limitation table for this object.

_library_group_limit_rs

Returns the internal resultset for the group limitation table.

<<