/** * @param ORM_Fields_Abstract $field * @param $value * * @return float|int|string */ private function clearValue(ORM_Fields_Abstract $field, $value) { if ($field->isInt()) { return intval($value); } elseif ($field->isFloat()) { return floatval($value); } else { return '"' . mysqli_real_escape_string(DB_MySQL::$connection_static, strval($value)) . '"'; } }
public function __construct(\Core\ORM_Record $factory_orm_record, $field_name, $field_title, $field_group = 'main', $field_position = null, $markdown_fieldname) { parent::__construct($factory_orm_record, $field_name, $field_title, $field_group, $field_position); $this->markdown_fieldname = $markdown_fieldname; }