Bug 18789: Add POD for is_adult and is_child
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Feb 2018 16:57:07 +0000 (13:57 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Feb 2018 16:57:57 +0000 (13:57 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patron.pm

index 8459299..ed4a1b3 100644 (file)
@@ -806,11 +806,26 @@ sub has_permission {
     return C4::Auth::haspermission( $self->userid, $flagsrequired );
 }
 
+=head3 is_adult
+
+my $is_adult = $patron->is_adult
+
+Return true if the patron has a category with a type Adult (A) or Organization (I)
+
+=cut
+
 sub is_adult {
     my ( $self ) = @_;
     return $self->category->category_type =~ /^(A|I)$/ ? 1 : 0;
 }
 
+=head3 is_child
+
+my $is_child = $patron->is_child
+
+Return true if the patron has a category with a type Child (C)
+
+=cut
 sub is_child {
     my( $self ) = @_;
     return $self->category->category_type eq 'C' ? 1 : 0;