/** * 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 ''; }
/** * @return string */ protected function getDeleteIcon() { $DeleteIcon = new Icon('fa-exclamation-triangle'); $DeleteIcon->setTooltip(__('Attention: This operation cannot be undone.')); return $DeleteIcon->code(); }
/** * @return string */ public function mapIcon() { if ($this->Activity->get(Activity\Object::ROUTEID) > 0) { $Icon = new Icon(Icon::MAP_ARROW); $Icon->setTooltip(__('Route data available')); return $Icon->code(); } return ''; }
/** * Get linked icon for this competition * @param int $id ID of the training * @return string */ private function getIconForCompetition($id) { if ($this->isFunCompetition($id)) { $tag = 'nofun'; $icon = new Icon(Icon::CLOCK_GRAY); $icon->setTooltip(__('Fun race | Click to mark this activity as a \'normal race\'.')); } else { $tag = 'fun'; $icon = new Icon(Icon::CLOCK); $icon->setTooltip(__('Race | Click to mark this activity as a \'fun race\'.')); } return $this->getInnerLink($icon->code(), 0, 0, $tag . '-' . $id); }