From 9209583a11c108b33ce24ebfc8d26fc1ef1f8268 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 29 Nov 2011 16:44:30 +0100 Subject: [PATCH] =?utf8?q?full=5Fname=20und=20full=5Fname=5Fdep=20methoden?= =?utf8?q?=20f=C3=BCr=20Contact?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Contact.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SL/DB/Contact.pm b/SL/DB/Contact.pm index d9ebf93e7..aa74bea3d 100644 --- a/SL/DB/Contact.pm +++ b/SL/DB/Contact.pm @@ -14,4 +14,17 @@ use SL::DB::Helper::CustomVariables ( # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. __PACKAGE__->meta->make_manager_class; +sub full_name { + my ($self) = @_; + die 'not an accessor' if @_ > 1; + join ', ', grep $_, $self->cp_name, $self->cp_givenname; +} + +sub full_name_dep { + my ($self) = @_; + die 'not an accessor' if @_ > 1; + $self->full_name + . join '', map { " ($_)" } grep $_, $self->cp_abteilung; +} + 1; -- 2.20.1