var $date_format = null; // Date format.
var $time_format = null; // Time format.
var $week_start = 0; // Week start day.
- var $show_holidays = 0; // Whether to show holidays in calendar.
var $tracking_mode = 0; // Tracking mode.
var $project_required = 0; // Whether project selection is required on time entires.
var $task_required = 0; // Whether task selection is required on time entires.
$this->configHelper = new ttConfigHelper($val['config']);
// Set user config options.
- $this->show_holidays = $this->configHelper->getDefinedValue('show_holidays');
$this->punch_mode = $this->configHelper->getDefinedValue('punch_mode');
$this->allow_overlap = $this->configHelper->getDefinedValue('allow_overlap');
$this->future_entries = $this->configHelper->getDefinedValue('future_entries');
return ($this->behalfGroup ? $this->behalfGroup->time_format : $this->time_format);
}
+ // getWeekStart returns week start day for active group.
+ function getWeekStart() {
+ return ($this->behalfGroup ? $this->behalfGroup->week_start : $this->week_start);
+ }
+
// getTrackingMode returns tracking mode for active group.
function getTrackingMode() {
return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode);
return ($this->behalfGroup ? $this->behalfGroup->configHelper->getConfig() : $this->configHelper->getConfig());
}
+ // getConfigHelper returns ttConfigHelper instance for active group.
+ function getConfigHelper() {
+ return ($this->behalfGroup ? $this->behalfGroup->configHelper : $this->configHelper);
+ }
+
// getConfigOption returns true if an option is defined for group.
// This helps us keeping a set of user attributes smaller.
// We determine whether the option is set only on pages that need to know.