Exemplo n.º 1
0
 /**
  * Get string to display this dataset value
  * @param \Runalyze\Dataset\Context $context
  * @return string
  */
 public function stringFor(Context $context)
 {
     if ($context->hasType()) {
         if ($context->type()->isQualitySession()) {
             return '<strong>' . $context->type()->abbreviation() . '</strong>';
         }
         return $context->type()->abbreviation();
     }
     return '';
 }
Exemplo n.º 2
0
 /**
  * Get string to display this dataset value
  * @param \Runalyze\Dataset\Context $context
  * @return string
  */
 public function stringFor(Context $context)
 {
     if (!$context->activity()->splits()->isEmpty()) {
         if ($context->activity()->splits()->hasActiveAndInactiveLaps() || round($context->activity()->splits()->totalDistance()) != round($context->activity()->distance()) || $context->hasType() && $context->type()->id() == Configuration::General()->competitionType()) {
             $Icon = new Icon(Icon::CLOCK);
             $Icon->setTooltip($this->stringForActiveLaps($context->activity()->splits()));
             return $Icon->code();
         }
     }
     return '';
 }