Ejemplo n.º 1
0
 /**
  * Remove data as weather, if sport is always inside
  */
 protected function removeDataIfInside()
 {
     if ($this->Object->sportid() > 0) {
         $Factory = \Runalyze\Context::Factory();
         if (!$Factory->sport($this->Object->sportid())->isOutside()) {
             $this->Object->weather()->condition()->set(\Runalyze\Data\Weather\Condition::UNKNOWN);
             $this->Object->weather()->temperature()->setTemperature(null);
             $this->Object->synchronize();
         }
     }
 }