Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
use Modern::Perl;
use Koha::Database;
+use Koha::Patron::Restriction::Type;
use base qw(Koha::Object);
=head2 Class methods
+=head2 Relation accessors
+
+=head3 type
+
+ my $restriction_type = $restriction->type;
+
+Returns the restriction type
+
+=cut
+
+sub type {
+ my ($self) = @_;
+ my $type_rs = $self->_result->type;
+ return Koha::Patron::Restriction::Type->_new_from_dbic($type_rs);
+}
+
=head2 Internal methods
=head3 _type