Bug 9239 follow-up: POD and perlcritic fixes
[koha.git] / Koha / QueryParser / Driver / PQF / query_plan / filter.pm
1 package Koha::QueryParser::Driver::PQF::query_plan::filter;
2 use base 'OpenILS::QueryParser::query_plan::filter';
3
4 use strict;
5 use warnings;
6
7 =head1 NAME
8
9 Koha::QueryParser::Driver::PQF::query_plan::filter - filter subclass for PQF driver
10
11 =head1 FUNCTIONS
12
13 =head2 Koha::QueryParser::Driver::PQF::query_plan::filter::target_syntax
14
15     my $pqf = $filter->target_syntax($server);
16
17 Transforms an OpenILS::QueryParser::query_plan::filter object into PQF. Do not use
18 directly.
19
20 =cut
21
22 sub target_syntax {
23     my ($self, $server) = @_;
24     my $attributes = $self->plan->QueryParser->bib1_mapping_by_name( 'filter', $self->name, $server );
25
26     if ($attributes->{'target_syntax_callback'}) {
27         return $attributes->{'target_syntax_callback'}->($self->plan->QueryParser, $self->name, $self->args, $self->negate, $server);
28     } else {
29         return '';
30     }
31 }
32
33 1;