GetModels: count Methode
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 28 Feb 2014 10:00:32 +0000 (11:00 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 4 Mar 2014 15:40:42 +0000 (16:40 +0100)
SL/Controller/Helper/GetModels.pm

index 481f1ee..6d85228 100644 (file)
@@ -27,6 +27,13 @@ sub get {
   return $self->manager->get_all(%params);
 }
 
+sub count {
+  my ($self) = @_;
+  my %params = $self->finalize;
+
+  return $self->manager->get_all_count(%params);
+}
+
 sub disable_plugin {
   my ($self, $plugin) = @_;
   die 'cannot change internal state after finalize was called' if $self->finalized;