--- lib/A3C/Model/StrixInstance.pm 2008/06/17 14:27:00 190 +++ lib/A3C/Model/StrixInstance.pm 2008/06/17 14:28:10 191 @@ -58,5 +58,19 @@ use A3C::DefaultACL; -1; +=head2 has_sites + + my $collection = A3C::Model::StrixInstance->has_sites; + +=cut +sub has_sites { + my $self = shift; + + my $collection = A3C::Model::StrixSiteCollection->new; + $collection->limit( column => 'instance', value => $self->instance ); + Jifty->log->debug("Instance ", $self->instance, " has ", $collection->count, " sites"); + return $collection; +} + +1;