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); }