CVars als Object Mixin.
[kivitendo-erp.git] / SL / DB / CustomVariable.pm
1 # This file has been auto-generated only because it didn't exist.
2 # Feel free to modify it at will; it will not be overwritten automatically.
3
4 package SL::DB::CustomVariable;
5
6 use strict;
7
8 use SL::DB::MetaSetup::CustomVariable;
9
10 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
11 __PACKAGE__->meta->make_manager_class;
12
13 sub value {
14   my $self = $_[0];
15   my $type = $self->config->type;
16
17   goto &bool_value      if $type eq 'boolean';
18   goto &timestamp_value if $type eq 'timestamp';
19   goto &number_value    if $type eq 'number';
20   goto &text_value; # text and select
21 }
22
23 1;