link_filter für Chart-Manager
[kivitendo-erp.git] / SL / DB / Manager / Chart.pm
1 package SL::DB::Manager::Chart;
2
3 use strict;
4
5 use SL::DB::Helper::Manager;
6 use base qw(SL::DB::Helper::Manager);
7
8 use SL::DB::Helper::Sorted;
9
10 sub object_class { 'SL::DB::Chart' }
11
12 __PACKAGE__->make_manager_methods;
13
14 sub link_filter {
15   my ($class, $link) = @_;
16
17   return (or => [ link => $link,
18                   link => { like => "${link}:\%"    },
19                   link => { like => "\%:${link}"    },
20                   link => { like => "\%:${link}:\%" } ]);
21 }
22
23 1;
24
25 __END__
26
27 =pod
28
29 =encoding utf8
30
31 =head1 NAME
32
33 SL::DB::Manager::Chart - Manager class for the model for the C<chart> table
34
35 =head1 FUNCTIONS
36
37 =over 4
38
39 =item C<link_filter $link>
40
41 Returns a query builder filter that matches charts whose 'C<link>'
42 field contains C<$link>. Matching is done so that the exact value of
43 C<$link> matches but not if C<$link> is only a substring of a
44 match. Therefore C<$link = 'AR'> will match the column content 'C<AR>'
45 or 'C<AR_paid:AR>' but not 'C<AR_amount>'.
46
47 =back
48
49 =head1 BUGS
50
51 Nothing here yet.
52
53 =head1 AUTHOR
54
55 Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
56
57 =cut