Exemple #1
0
 /**
  * Display
  * @return string
  */
 public function code()
 {
     if ($this->WindSpeed->isUnknown() && $this->WindDegree->isUnknown()) {
         return '';
     }
     $code = '<span class="' . self::BASE_CLASS . '"' . $this->tooltipAttributes() . '>';
     if (!$this->WindDegree->isUnknown()) {
         $code .= '<span class="' . self::DIRECTION_CLASS . '" style="transform:rotate(' . $this->WindDegree->value() . 'deg);"></span> ';
     }
     $code .= $this->WindSpeed->isUnknown() ? '?' : $this->WindSpeed->string(false);
     $code .= '</span>';
     return $code;
 }