示例#1
0
 /**
  * Init sections
  */
 protected function initSections()
 {
     if (Configuration::ActivityView()->mapFirst() && Configuration::ActivityView()->plotMode()->showCollection()) {
         $this->Sections[] = new SectionComposite($this->Context);
         $this->Sections[] = new SectionLaps($this->Context);
     } else {
         $this->Sections[] = new SectionOverview($this->Context);
         if (Configuration::ActivityView()->mapFirst()) {
             $this->Sections[] = new SectionRouteOnlyMap($this->Context);
         } else {
             $this->Sections[] = new SectionLaps($this->Context);
         }
         $this->Sections[] = new SectionSwimLane($this->Context);
         if (Configuration::ActivityView()->plotMode()->showSeperated()) {
             $this->Sections[] = new SectionHeartrate($this->Context);
             $this->Sections[] = new SectionPace($this->Context);
             if (Configuration::ActivityView()->mapFirst()) {
                 $this->Sections[] = new SectionRouteOnlyElevation($this->Context);
             } else {
                 $this->Sections[] = new SectionRoute($this->Context);
             }
         } else {
             $this->Sections[] = new SectionComposite($this->Context);
             if (Configuration::ActivityView()->plotMode()->showPaceAndHR()) {
                 if (Configuration::ActivityView()->mapFirst()) {
                     $this->Sections[] = new SectionRouteOnlyElevation($this->Context);
                 } else {
                     $this->Sections[] = new SectionRoute($this->Context);
                 }
             } else {
                 if (!Configuration::ActivityView()->mapFirst()) {
                     $this->Sections[] = new SectionRouteOnlyMap($this->Context);
                 }
             }
         }
         if (Configuration::ActivityView()->mapFirst()) {
             $this->Sections[] = new SectionLaps($this->Context);
         }
     }
     if ($this->Context->trackdata()->has(\Runalyze\Model\Trackdata\Object::CADENCE) && $this->Context->sport()->id() == Configuration::General()->runningSport() || $this->Context->trackdata()->has(\Runalyze\Model\Trackdata\Object::GROUNDCONTACT) || $this->Context->trackdata()->has(\Runalyze\Model\Trackdata\Object::VERTICAL_OSCILLATION)) {
         $this->Sections[] = new SectionRunningDynamics($this->Context);
         $this->Sections[] = new SectionMiscellaneous($this->Context, false);
     } else {
         $this->Sections[] = new SectionMiscellaneous($this->Context, true);
     }
     if ($this->Context->hasHRV()) {
         $this->Sections[] = new SectionHRV($this->Context);
     }
 }