Exemplo n.º 1
0
 /**
  * @see parent::getValue()
  */
 function getValue($object, $smarty = null, $params = array())
 {
     if ($this->class) {
         return CMbString::htmlSpecialChars(CAppUI::tr($object->{$this->fieldName}));
     }
     return parent::getValue($object, $smarty, $params);
 }
Exemplo n.º 2
0
 /**
  * @see parent::getValue()
  */
 function getValue($object, $smarty = null, $params = array())
 {
     $propValue = $object->{$this->fieldName};
     if (!$propValue || $propValue === "0000-00-00") {
         return "";
     }
     return parent::getValue($object, $smarty, $params);
 }
Exemplo n.º 3
0
 /**
  * @see parent::getValue()
  */
 function getValue($object, $smarty = null, $params = array())
 {
     if (!isset($this->byteUnit)) {
         return parent::getValue($object, $smarty, $params);
     }
     $propValue = $object->{$this->fieldName};
     $ratio = 1;
     switch ($this->byteUnit) {
         case "GB":
             $ratio *= 1024;
         case "MB":
             $ratio *= 1024;
         case "KB":
             $ratio *= 1024;
         case "B":
         default:
     }
     return CMbString::toDecaBinary($propValue * $ratio);
 }