1 #$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/Keywords.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
5 RT::Keywords - a collection of RT::Keyword objects
10 my $keywords = RT::Keywords->new($user);
11 $keywords->LimitToParent(0);
12 while my ($keyword = $keywords->Next()) {
13 print $keyword->Name ."\n";
24 ok (require RT::TestHarness);
25 ok (require RT::Keywords);
38 @ISA = qw( RT::EasySearch );
45 $self->{'table'} = 'Keywords';
46 $self->{'primary_key'} = 'id';
48 # By default, order by name
49 $self->OrderBy( ALIAS => 'main',
53 return ($self->SUPER::_Init(@_));
61 A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
62 we're explicitly trying to see them.
69 #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
70 unless($self->{'find_disabled_rows'}) {
71 $self->LimitToEnabled();
74 return($self->SUPER::_DoSearch(@_));
83 return (RT::Keyword->new($self->CurrentUser));
87 # {{{ sub LimitToParent
91 Takes a parent id and limits the returned keywords to children of that parent.
98 $self->Limit( FIELD => 'Parent',
101 ENTRYAGGREGATOR => 'OR' );