Koha::Patron::Attribute - Koha Patron Attribute Object class
my $attribute = Koha::Patron::Attribute->new({ code => 'a_code', ... }); try { $attribute->store } catch { handle_exception };
my $attribute = Koha::Patron::Attribute->new({ code => 'a_code', ... }); if ( $attribute->opac_display ) { ... }
my $attribute = Koha::Patron::Attribute->new({ code => 'a_code', ... }); if ( $attribute->is_opac_editable ) { ... }
my $attribute_type = $attribute->type;
Returns a Koha::Patron::Attribute::Type
object corresponding to the current patron attribute
_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 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.