Bug 28378: Elasticsearch - Add 264c to default copydate mappings (MARC21)
[koha-ffzg.git] / Koha / Patron / Categories.pm
index 7d651f1..ae24b0b 100644 (file)
@@ -17,15 +17,11 @@ package Koha::Patron::Categories;
 
 use Modern::Perl;
 
-use Carp;
-
-use C4::Context; # Sigh...
-
 use Koha::Database;
 
 use Koha::Patron::Category;
 
-use base qw(Koha::Objects);
+use base qw(Koha::Objects Koha::Objects::Limit::Library);
 
 =head1 NAME
 
@@ -33,22 +29,13 @@ Koha::Patron::Categories - Koha Patron Category Object set class
 
 =head1 API
 
-=head2 Class Methods
+=head2 Class methods
 
 =cut
 
-sub search_limited {
-    my ( $self, $params, $attributes ) = @_;
-    my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : "";
-    if ( $branch_limit ) {
-        $params->{'categories_branches.branchcode'} = [ $branch_limit, undef ];
-        $attributes->{join} = 'categories_branches';
-    }
-    $attributes->{order_by} = ['description'] unless $attributes->{order_by};
-    return $self->search($params, $attributes);
-}
+=head2 Internal methods
 
-=head3 type
+=head3 _type
 
 =cut
 
@@ -56,6 +43,10 @@ sub _type {
     return 'Category';
 }
 
+=head3 object_class
+
+=cut
+
 sub object_class {
     return 'Koha::Patron::Category';
 }