View | Details | Raw Unified | Return to bug 8726
Collapse All | Expand All

(-)a/Koha/SuggestionEngine/Base.pm (-45 / +3 lines)
Lines 34-42 B<get_suggestions (\%param)> - get suggestions for the search described Link Here
34
in $param->{'search'}, and return them in a hashref with the suggestions
34
in $param->{'search'}, and return them in a hashref with the suggestions
35
as keys and relevance as values.
35
as keys and relevance as values.
36
36
37
The following variables must be defined in each filter:
37
B<NAME> - return a string with the name of the plugin.
38
  our $NAME ='Filter';
38
39
  our $VERSION = '1.0';
39
B<VERSION> - return a string with the version of the plugin.
40
40
41
These methods may be overriden:
41
These methods may be overriden:
42
42
Lines 123-168 sub get_suggestions { Link Here
123
    return;
123
    return;
124
}
124
}
125
125
126
=head2 NAME
127
128
    my $name = $plugin->NAME;
129
130
Getter function for plugin names.
131
132
=cut
133
134
sub NAME {
135
    my $self = shift;
136
    my $package = ref $self || $self;
137
    return eval '$' . $package . '::NAME';
138
}
139
140
=head2 VERSION
141
142
    my $version = $plugin->VERSION;
143
144
Getter function for plugin versions.
145
146
=cut
147
148
sub VERSION {
149
    my $self = shift;
150
    my $package = ref $self || $self;
151
    return eval '$' . $package . '::VERSION';
152
}
153
154
=head2 DESCRIPTION
155
156
    my $description = $plugin->DESCRIPTION;
157
158
Getter function for plugin descriptions.
159
160
=cut
161
162
sub DESCRIPTION {
163
    my $self = shift;
164
    my $package = ref $self || $self;
165
    return eval '$' . $package . '::DESCRIPTION';
166
}
167
168
1;
126
1;
(-)a/Koha/SuggestionEngine/Plugin/AuthorityFile.pm (-2 / +18 lines)
Lines 35-42 use warnings; Link Here
35
use Carp;
35
use Carp;
36
36
37
use base qw(Koha::SuggestionEngine::Base);
37
use base qw(Koha::SuggestionEngine::Base);
38
our $NAME    = 'AuthorityFile';
38
39
our $VERSION = '1.0';
39
=head2 NAME
40
    my $name = $plugin->NAME;
41
42
=cut
43
44
sub NAME {
45
    return 'AuthorityFile';
46
}
47
48
=head2 VERSION
49
    my $version = $plugin->VERSION;
50
51
=cut
52
53
sub VERSION {
54
    return '1.1';
55
}
40
56
41
=head2 get_suggestions
57
=head2 get_suggestions
42
58
(-)a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm (-2 / +18 lines)
Lines 37-44 use Carp; Link Here
37
use C4::Templates qw(gettemplate); # This is necessary for translatability
37
use C4::Templates qw(gettemplate); # This is necessary for translatability
38
38
39
use base qw(Koha::SuggestionEngine::Base);
39
use base qw(Koha::SuggestionEngine::Base);
40
our $NAME    = 'ExplodedTerms';
40
41
our $VERSION = '1.0';
41
=head2 NAME
42
    my $name = $plugin->NAME;
43
44
=cut
45
46
sub NAME {
47
    return 'ExplodedTerms';
48
}
49
50
=head2 VERSION
51
    my $version = $plugin->VERSION;
52
53
=cut
54
55
sub VERSION {
56
    return '1.0';
57
}
42
58
43
=head2 get_suggestions
59
=head2 get_suggestions
44
60
(-)a/Koha/SuggestionEngine/Plugin/Null.pm (-3 / +18 lines)
Lines 36-43 use warnings; Link Here
36
use Carp;
36
use Carp;
37
37
38
use base qw(Koha::SuggestionEngine::Base);
38
use base qw(Koha::SuggestionEngine::Base);
39
our $NAME    = 'Null';
39
40
our $VERSION = '1.0';
40
=head2 NAME
41
    my $name = $plugin->NAME;
42
43
=cut
44
45
sub NAME {
46
    return 'Null';
47
}
48
49
=head2 VERSION
50
    my $version = $plugin->VERSION;
51
52
=cut
53
54
sub VERSION {
55
    return '1.1';
56
}
41
57
42
=head2 get_suggestions
58
=head2 get_suggestions
43
59
44
- 

Return to bug 8726