From: G. Richardson Date: Sun, 7 Aug 2016 20:52:27 +0000 (+0200) Subject: Manager für PartsGroup mit sort_spec X-Git-Tag: release-3.5.4~1897 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4ad8ecea0ba37ba748bb16b347a097e407c864d7;p=kivitendo-erp.git Manager für PartsGroup mit sort_spec --- diff --git a/SL/DB/Manager/PartsGroup.pm b/SL/DB/Manager/PartsGroup.pm new file mode 100644 index 000000000..24e016c33 --- /dev/null +++ b/SL/DB/Manager/PartsGroup.pm @@ -0,0 +1,19 @@ +package SL::DB::Manager::PartsGroup; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +use SL::DB::Helper::Sorted; + +sub object_class { 'SL::DB::PartsGroup' } + +__PACKAGE__->make_manager_methods; + +sub _sort_spec { + return ( default => [ 'partsgroup', 1 ], + columns => { SIMPLE => 'ALL' }); +} + +1; diff --git a/SL/DB/PartsGroup.pm b/SL/DB/PartsGroup.pm index ed3c164fe..f40c5de96 100644 --- a/SL/DB/PartsGroup.pm +++ b/SL/DB/PartsGroup.pm @@ -6,6 +6,7 @@ package SL::DB::PartsGroup; use strict; use SL::DB::MetaSetup::PartsGroup; +use SL::DB::Manager::PartsGroup; __PACKAGE__->meta->add_relationship( custom_variable_configs => { @@ -16,9 +17,6 @@ __PACKAGE__->meta->add_relationship( __PACKAGE__->meta->initialize; -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; - sub displayable_name { my $self = shift;