<<

NAME

Koha::Patron::Attribute - Koha Patron Attribute Object class

API

Class Methods

store

    my $attribute = Koha::Patron::Attribute->new({ code => 'a_code', ... });
    try { $attribute->store }
    catch { handle_exception };

opac_display

    my $attribute = Koha::Patron::Attribute->new({ code => 'a_code', ... });
    if ( $attribute->opac_display ) { ... }

opac_editable

    my $attribute = Koha::Patron::Attribute->new({ code => 'a_code', ... });
    if ( $attribute->is_opac_editable ) { ... }

type

    my $attribute_type = $attribute->type;

Returns a Koha::Patron::Attribute::Type object corresponding to the current patron attribute

Internal methods

_check_repeatable

_check_repeatable checks if the attribute type is repeatable and throws and exception if the attribute type isn't repeatable and there's already an attribute with the same code for the given patron.

_check_unique_id

_check_unique_id checks if the attribute type is marked as unique id and throws and exception if the attribute type is a unique id and there's already an attribute with the same code and value on the database.

_type

<<