1 #$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attachments.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
5 RT::Attachments - a collection of RT::Attachment objects
13 This module should never be called directly by client code. it's an internal module which
14 should only be accessed through exported APIs in Ticket, Queue and other similar objects.
22 ok (require RT::TestHarness);
23 ok (require RT::Attachments);
29 package RT::Attachments;
33 @ISA= qw(RT::EasySearch);
39 $self->{'table'} = "Attachments";
40 $self->{'primary_key'} = "id";
41 return ( $self->SUPER::_Init(@_));
48 =head2 ContentType (VALUE => 'text/plain', ENTRYAGGREGATOR => 'OR', OPERATOR => '=' )
50 Limit result set to attachments of ContentType 'TYPE'...
57 my %args = ( VALUE => 'text/plain',
59 ENTRYAGGREGATOR => 'OR',
62 $self->Limit ( FIELD => 'ContentType',
63 VALUE => $args{'VALUE'},
64 OPERATOR => $args{'OPERATOR'},
65 ENTRYAGGREGATOR => $args{'ENTRYAGGREGATOR'});
73 Limit result set to children of Attachment ID
80 my $attachment = shift;
81 $self->Limit ( FIELD => 'Parent',
82 VALUE => $attachment);
91 my $item = new RT::Attachment($self->CurrentUser);