1 #$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/KeywordSelects.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
7 ok (require RT::TestHarness);
8 ok (require RT::Scrip);
15 package RT::KeywordSelects;
20 use RT::KeywordSelect;
22 @ISA = qw( RT::EasySearch );
27 $self->{'table'} = 'KeywordSelects';
28 $self->{'primary_key'} = 'id';
29 return ($self->SUPER::_Init(@_));
37 A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
38 we're explicitly trying to see them.
45 #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
46 unless($self->{'find_disabled_rows'}) {
47 $self->LimitToEnabled();
50 return($self->SUPER::_DoSearch(@_));
56 # {{{ sub LimitToQueue
59 Takes a queue id. Limits the returned set to KeywordSelects for that queue.
60 Repeated calls will be OR'd together.
68 $self->Limit( FIELD => 'ObjectValue',
71 ENTRYAGGREGATOR => 'OR'
74 $self->Limit( FIELD => 'ObjectType',
78 $self->Limit( FIELD => 'ObjectField',
86 # {{{ sub LimitToGlobals
90 Limits the returned set to KeywordSelects for all queues.
91 Repeated calls will be OR'd together.
98 $self->Limit( FIELD => 'ObjectType',
102 $self->Limit( FIELD => 'ObjectField',
106 $self->Limit( FIELD => 'ObjectValue',
109 ENTRYAGGREGATOR => 'OR'
115 # {{{ sub IncludeGlobals
116 =head2 IncludeGlobals
118 Include KeywordSelects which apply globally in the set of returned results
125 $self->Limit( FIELD => 'ObjectValue',
128 ENTRYAGGREGATOR => 'OR'
139 return (new RT::KeywordSelect($self->CurrentUser));