Exemplo n.º 1
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     if ($Context->hasRoute()) {
         $upDown = '+' . ElevationBase::format($Context->route()->elevationUp(), false) . '/-' . ElevationBase::format($Context->route()->elevationDown(), false);
     } else {
         $upDown = '+' . ElevationBase::format($Context->activity()->elevation(), false) . '/-' . ElevationBase::format($Context->activity()->elevation(), false);
     }
     parent::__construct($upDown, Configuration::General()->distanceUnitSystem()->elevationUnit(), __('Elevation up/down'));
 }
Exemplo n.º 2
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Pace = clone $Context->dataview()->pace();
     if (Configuration::General()->distanceUnitSystem()->isImperial()) {
         $Pace->setUnit(new PaceUnit\MinPerMile());
     } else {
         $Pace->setUnit(new PaceUnit\MinPerKilometer());
     }
     parent::__construct($Pace->value(), $Pace->appendix(), 'ø ' . __('Pace'));
 }
Exemplo n.º 3
0
 protected function addSeo()
 {
     $action = Utils::get('action');
     $pageRepository = new PageRepository(TRUE);
     $page = $pageRepository->getOneByAlias($action);
     if (self::$seoAdded === FALSE) {
         BangSeo::addTitlePart($page['title']);
         BangSeo::setDescription($page['meta_description']);
         BangSeo::addContentForKeywords($page['meta_keywords'], BangSeo::MEDIUM_PRIORITY);
         self::$seoAdded = TRUE;
     }
 }
Exemplo n.º 4
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $WindChillFactor = $Context->dataview()->windChillFactor();
     parent::__construct(round($WindChillFactor->valueInPreferredUnit()), $WindChillFactor->unit(), $WindChillFactor->label());
 }
Exemplo n.º 5
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $leftRight = $Context->activity()->groundContactBalanceLeft() / 100 . 'L/' . $Context->activity()->groundContactBalanceRight() / 100 . 'R';
     parent::__construct($leftRight, '%', __('Ground Contact Balance'));
 }
Exemplo n.º 6
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $WindDirection = $Context->activity()->weather()->windDegree();
     $CardinalDirection = CardinalDirection::getDirection($WindDirection->value());
     parent::__construct(\Helper::Unknown($CardinalDirection . ' / ' . $WindDirection->string(false), '-'), $WindDirection->unit(), $WindDirection->label());
 }
Exemplo n.º 7
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $humidity = $Context->activity()->weather()->humidity();
     parent::__construct(\Helper::Unknown($humidity->string(false), '-'), $humidity->unit(), $humidity->label());
 }
Exemplo n.º 8
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     parent::__construct(\Runalyze\Activity\GroundcontactBalance::format($Context->activity()->groundContactBalance(), false), '%', __('Ground Contact Balance'));
 }
Exemplo n.º 9
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Distance = new \Runalyze\Activity\Distance($Context->activity()->distance());
     parent::__construct(\Helper::Unknown(round($Distance->valueInPreferredUnit(), 2), '-'), $Distance->unit(), $Distance->label());
 }
Exemplo n.º 10
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $PoolLength = new Activity\PoolLength($Context->swimdata()->poollength());
     parent::__construct(\Helper::Unknown($PoolLength->valueInPreferredUnit(), '-'), $PoolLength->unit(), $PoolLength->label());
 }
Exemplo n.º 11
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $StrideLength = $Context->dataview()->strideLength();
     parent::__construct(\Helper::Unknown($StrideLength->valueInPreferredUnit(), '-'), $StrideLength->unit(), $StrideLength->label());
 }
Exemplo n.º 12
0
 /**
  * @author WN
  * @param int|null $color
  * @param int|null $option
  * @param int|null $bgcolor
  * @param string|null $default
  */
 protected function __construct($color = null, $option = null, $bgcolor = null, $default = null)
 {
     $width = (int) exec('tput cols');
     $height = (int) exec('tput lines');
     parent::__construct($width, $height, $color, $option, $bgcolor, $default);
 }
Exemplo n.º 13
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Elevation = $Context->dataview()->elevation();
     parent::__construct(\Helper::Unknown($Elevation->valueInPreferredUnit(), '-'), $Elevation->unit(), $Elevation->label());
 }
Exemplo n.º 14
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     parent::__construct(\Helper::Unknown(\Runalyze\Activity\VerticalRatio::format($Context->activity()->verticalRatio(), false), '-'), '%', __('Vertical Ratio'));
 }
Exemplo n.º 15
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     parent::__construct(\Helper::Unknown(substr($Context->dataview()->gradientInPercent(), 0, -11), '-'), '%', __('ø Gradient'));
 }
Exemplo n.º 16
0
 /**
  * Constructor
  * @param \Runalyze\View\Activity\Context $Context
  */
 public function __construct(\Runalyze\View\Activity\Context $Context)
 {
     $Pace = $Context->dataview()->pace();
     parent::__construct($Pace->value(), $Pace->appendix(), 'ø ' . ($Pace->unit()->isTimeFormat() ? __('Pace') : __('Speed')));
 }