/** * @see parent::getValue() */ function getValue($object, $smarty = null, $params = array()) { $value = $object->{$this->fieldName}; $decimals = CMbArray::extract($params, "decimals", $this->decimals); $empty = CMbArray::extract($params, "empty"); return CSmartyMB::currency($value, $decimals, $this->precise, $empty); }
/** * Constructor */ function __construct($dir = null) { parent::__construct($dir); $this->makePlaceholders(); $this->assign("placeholders", self::$placeholders); $this->register_compiler_function("mb_return", array($this, "mb_return")); $this->register_block("mb_form", array($this, "mb_form")); $this->register_block("vertical", array($this, "vertical")); $this->register_function("mb_field", array($this, "mb_field")); $this->register_function("mb_key", array($this, "mb_key")); $this->register_function("mb_label", array($this, "mb_label")); $this->register_function("mb_title", array($this, "mb_title")); $this->register_function("mb_ternary", array($this, "mb_ternary")); $this->register_function("mb_colonne", array($this, "mb_colonne")); }