/** * Prepare internal properties */ protected function prepareProperties() { $this->DemandedTime = new Duration(); $this->DemandedPace = new Pace(0, 1); $this->DemandedPace->setUnitEnum(PaceUnit::MIN_PER_KM); if (isset($_POST['distance'])) { $_POST['distance'] = str_replace(',', '.', $_POST['distance']); } elseif ($this->Context->activity()->splits()->isEmpty()) { $_POST['distance'] = Configuration::General()->distanceUnitSystem()->distanceToKmFactor(); } }