-### Accessor methods
-
-=head2 Next
-
-Returns the next object in the collection.
-
-=cut
-
-sub Next {
- my $self = shift;
- my $search = $self->{'objects'}->[$self->{'idx'}];
- if ($search) {
- $self->{'idx'}++;
- } else {
- # We have run out of objects; reset the counter.
- $self->{'idx'} = 0;
- }
- return $search;
-}
-
-=head2 Count
-
-Returns the number of search objects found.
-
-=cut
-
-sub Count {
- my $self = shift;
- return scalar @{$self->{'objects'}};
-}
-
-### Internal methods
-
-# _GetObject: helper routine to load the correct object whose parameters
-# have been passed.
-
-sub _GetObject {
- my $self = shift;
- my $privacy = shift;
-
- return RT::SavedSearch->new($self->CurrentUser)->_GetObject($privacy);
-}
-
-### Internal methods
-
-# _PrivacyObjects: returns a list of objects that can be used to load saved searches from.
-
-sub _PrivacyObjects {
- my $self = shift;
- my $CurrentUser = $self->CurrentUser;
-
- my $groups = RT::Groups->new($CurrentUser);
- $groups->LimitToUserDefinedGroups;
- $groups->WithMember( PrincipalId => $CurrentUser->Id,
- Recursively => 1 );
-
- return ( $CurrentUser->UserObj, @{ $groups->ItemsArrayRef() } );
-}
-