/** * @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); }
/** * @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); }
/** * @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); }