/** * Prepare summary */ protected function prepare() { parent::prepare(); $this->Title = sprintf(__('All training weeks %s'), $this->Year); $this->TimeEnd = $this->Year == date("Y") ? Time::weekend(time()) : Time::weekend(mktime(1, 0, 0, 12, 31, $this->Year)); $this->TimeStart = Time::weekstart(mktime(1, 0, 0, 12, 31, $this->Year - 1)); }
/** * Display table with last week-statistics * @param bool $showAllWeeks */ private function displayWeekTable($showAllWeeks = false) { if (($this->showsAllYears() || $this->showsSpecificYear() && $this->year != date('Y')) && !$showAllWeeks) { return; } if ($showAllWeeks) { $SummaryTable = new SummaryTableAllWeeks($this->Dataset, $this->sportid, $this->year); } else { $SummaryTable = new SummaryTable10Weeks($this->Dataset, $this->sportid, $this->year); } $SummaryTable->compareKilometers($this->Configuration()->value('compare_weeks')); $SummaryTable->display(); }