1 package SL::Helper::UserPreferences::TimeRecording;
4 use parent qw(Rose::Object);
7 use List::MoreUtils qw(none);
9 use SL::Helper::UserPreferences;
11 use Rose::Object::MakeMethods::Generic (
12 'scalar --get_set_init' => [ qw(user_prefs) ],
15 sub get_use_duration {
16 !!$_[0]->user_prefs->get('use_duration');
19 sub store_use_duration {
20 $_[0]->user_prefs->store('use_duration', $_[1]);
24 SL::Helper::UserPreferences->new(
25 namespace => $_[0]->namespace,
30 sub namespace { 'TimeRecording' }
43 SL::Helper::UserPreferences::TimeRecording - preferences intended
44 to store user settings for using the time recording functionality.
48 use SL::Helper::UserPreferences::TimeRecording;
49 my $prefs = SL::Helper::UserPreferences::TimeRecording->new();
51 $prefs->store_use_duration(1);
52 my $value = $prefs->get_use_duration;
56 This module manages storing the user's choise for settings for
57 the time recording controller.
58 For now it can be choosen if an entry is done by entering start and
59 end time or a date and a duration.
67 Bernd Bleßmann E<lt>bernd@kivitendo-premium.deE<gt>