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_type = $attribute->type;
Returns a Koha::Patron::Attribute::Type
object corresponding to the current patron attribute
my $authorised_value = $attribute->authorised_value;
Return the Koha::AuthorisedValue object of this attribute when one is attached.
Return undef if this attribute is not attached to an authorised value
my $description = $patron_attribute->description;
Return the value of this attribute or the description of the authorised value (when attached).
This method must be called when the authorised value's description must be displayed instead of the code.
This method returns the mapping for representing a Koha::Patron::Attribute object on the API.
Checks if the attribute type is repeatable and returns a boolean representing whether storing the current object state would break the repeatable constraint.
Checks if the attribute type is marked as unique and returns a boolean representing whether storing the current object state would break the unique constraint.
Checks if the value of the attribute is valid for the type