示例#1
0
 /**
  * Init data
  * @var \Runalyze\View\Activity\Context $context
  * @var boolean $forceOriginal
  */
 protected function initDataWithSwimdata(Activity\Context $context)
 {
     if (!$context->hasSwimdata()) {
         $this->Data = array();
         return;
     }
     $key = Swimdata::SWOLFCYCLES;
     if (!$context->swimdata()->has($key)) {
         $this->Data = array();
         return;
     }
     $Collector = new DataCollectorWithSwimdata($context->trackdata(), $key, $context->swimdata());
     $this->Data = $Collector->data();
     $this->XAxis = $Collector->xAxis();
 }