function display($record = "", $mode = '') { if ($this->getSearchType() == "number") { $attr = new NumberAttribute($this->fieldName()); return $attr->display($record, $mode); } else { if ($this->getSearchType() == "date") { $attr = new DateAttribute($this->fieldName()); $record[$this->fieldName()] = $attr->db2value($record); return $attr->display($record, $mode); } } return parent::display($record, $mode); }
/** * overrides the display function to put the currencysymbol in front of the input field. * * The regular Attribute uses PHP's nl2br() and htmlspecialchars() * methods to prepare a value for display, unless $mode is "cvs". * * @param array $record The record that holds the value for this attribute * @param string $mode The display mode ("view" for viewpages, or "list" * for displaying in recordlists, "edit" for * displaying in editscreens, "add" for displaying in * add screens. "csv" for csv files. Applications can * use additional modes. * * @return string HTML String */ public function display($record, $mode) { $result = empty($this->m_currencysymbol) ? '' : $this->getCurrencySymbolDisplay() . ' '; $result .= parent::display($record, $mode); return $result; }