1 # $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Templates.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
5 RT::Templates - a collection of RT Template objects
18 ok (require RT::TestHarness);
19 ok (require RT::Templates);
25 package RT::Templates;
27 @ISA= qw(RT::EasySearch);
34 Returns RT::Templates specific init info like table and primary key names
41 $self->{'table'} = "Templates";
42 $self->{'primary_key'} = "id";
43 return ($self->SUPER::_Init(@_));
47 # {{{ LimitToNotInQueue
49 =head2 LimitToNotInQueue
51 Takes a queue id # and limits the returned set of templates to those which
52 aren't that queue's templates.
56 sub LimitToNotInQueue {
59 $self->Limit(FIELD => 'Queue',
70 Takes no arguments. Limits the returned set to "Global" templates
71 which can be used with any queue.
78 $self->Limit(FIELD => 'Queue',
89 Takes a queue id # and limits the returned set of templates to that queue's
97 $self->Limit(FIELD => 'Queue',
108 Returns a new empty Template object
116 my $item = new RT::Template($self->CurrentUser);