/** * 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 ''; }
/** * 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 ''; }