/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->hasSport()) { return $context->sport()->icon()->code(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->condition()->isUnknown() && ($context->hasSport() || $context->sport()->isOutside())) { return $context->activity()->weather()->condition()->icon()->code(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->pressure()->isUnknown() && !($context->hasSport() && !$context->sport()->isOutside())) { return $context->activity()->weather()->pressure()->string(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->temperature()->isUnknown() && !$context->activity()->weather()->windSpeed()->isUnknown() && !($context->hasSport() && !$context->sport()->isOutside())) { return $context->dataview()->windChillFactor()->string(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if (!$context->activity()->weather()->temperature()->isUnknown() && !($context->hasSport() && !$context->sport()->isOutside())) { return \Runalyze\Activity\Temperature::format($context->activity()->weather()->temperature()->value(), true, false); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { $weather = $context->activity()->weather(); if ((!$weather->windSpeed()->isUnknown() || !$weather->windDegree()->isUnknown()) && !($context->hasSport() && !$context->sport()->isOutside())) { return (new WindIcon($weather->windSpeed(), $weather->windDegree()))->code(); } return ''; }
/** * Get string to display this dataset value * @param \Runalyze\Dataset\Context $context * @return string */ public function stringFor(Context $context) { if ($context->activity()->distance() > 0) { if ($context->hasData(self::DURATION_SUM_WITH_DISTANCE_KEY)) { if ($context->data(self::DURATION_SUM_WITH_DISTANCE_KEY) > 0) { $Pace = new Activity\Pace($context->data(self::DURATION_SUM_WITH_DISTANCE_KEY), $context->activity()->distance(), $context->hasSport() ? $context->sport()->paceUnitEnum() : Activity\Pace::STANDARD); return $Pace->valueWithAppendix(); } return ''; } return $context->dataview()->pace()->valueWithAppendix(); } return ''; }