From 5c5cbb9f90449da8064d749183586a78b4216742 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 12 May 2011 11:32:26 +0200 Subject: [PATCH] =?utf8?q?Standard-Sortierung=20f=C3=BCr=20Language-Model?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Conflicts: SL/Controller/DeliveryPeriod.pm SL/Controller/DeliveryTerm.pm --- SL/DB/Language.pm | 7 +------ SL/DB/Manager/Language.pm | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 SL/DB/Manager/Language.pm diff --git a/SL/DB/Language.pm b/SL/DB/Language.pm index abfdebce0..3248f386c 100644 --- a/SL/DB/Language.pm +++ b/SL/DB/Language.pm @@ -1,13 +1,8 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - package SL::DB::Language; use strict; use SL::DB::MetaSetup::Language; - -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; +use SL::DB::Manager::Language; 1; diff --git a/SL/DB/Manager/Language.pm b/SL/DB/Manager/Language.pm new file mode 100644 index 000000000..db0d29a72 --- /dev/null +++ b/SL/DB/Manager/Language.pm @@ -0,0 +1,21 @@ +package SL::DB::Manager::Language; + +use strict; + +use SL::DB::Helper::Manager; +use base qw(SL::DB::Helper::Manager); + +use SL::DB::Helper::Sorted; + +sub object_class { 'SL::DB::Language' } + +__PACKAGE__->make_manager_methods; + +sub _sort_spec { + return ( default => [ 'description', 1 ], + columns => { SIMPLE => 'ALL', + map { ( $_ => "lower(language.${_})" ) } qw(description template_code article_code), + }); +} + +1; -- 2.20.1