Пример #1
0
 public function getJumboMenuColor()
 {
     //get the available rating
     $percent = $this->getRating();
     //get the color depending on rating
     if ($percent >= '70%' || $percent == '100%') {
         if ($dbColor = $this->options->getColor('success')) {
             $color = $dbColor;
         } else {
             $color = '#5D8C2E';
         }
     } elseif ($percent < '70%' && $percent > '50%') {
         if ($dbColor = $this->options->getColor('warning')) {
             $color = $dbColor;
         } else {
             $color = '#CB8820';
         }
     } else {
         if ($dbColor = $this->options->getColor('danger')) {
             $color = $dbColor;
         } else {
             $color = '#A43B2C';
             //#DE6C69
         }
     }
     return $color;
 }