19 declare(strict_types=1);
    44         string $a_postvar = 
""    48         $this->
lng = $DIC->language();
    54         $this->suffix = $a_value;
    62     public function setValue(?
string $a_value): void
    64         if ($a_value == 
"" || is_null($a_value)) {
    68         $this->value = (float) str_replace(
',', 
'.', $a_value);
    72             $this->value = round($this->value);
    77             $this->value = round($this->value, $this->
getDecimals());
    80             $this->value = (float) number_format($this->value, $this->
getDecimals(), 
".", 
"");
    91         $data = unserialize($a_data);
   103         $this->maxlength = $a_maxlength;
   135         $this->size = $a_size;
   150         bool $a_display_always = 
false   152         $this->minvalue = $a_minvalue;
   153         $this->minvalue_visible = $a_display_always;
   163         bool $a_display_always = 
false   165         $this->maxvalue = $a_maxvalue;
   166         $this->maxvalue_visible = $a_display_always;
   176         $this->decimals = $a_decimals;
   177         if ($this->decimals) {
   189         $this->allow_decimals = $a_value;
   206         $val = str_replace(
',', 
'.', $val);
   208         if ($val != 
"" && !is_numeric($val)) {
   209             $this->minvalue_visible = 
true;
   210             $this->maxvalue_visible = 
true;
   218                 $this->minvalue_visible = 
true;
   226                 $this->minvalue_visible = 
true;
   236                 $this->maxvalue_visible = 
true;
   244                 $this->maxvalue_visible = 
true;
   256         if (trim($value) == 
"") {
   259         return (
float) str_replace(
',', 
'.', $value);
   275         $tpl = 
new ilTemplate(
"tpl.prop_number.html", 
true, 
true, 
"Services/Form");
   277         if (strlen((
string) $this->
getValue())) {
   278             $tpl->setCurrentBlock(
"prop_number_propval");
   280             $tpl->parseCurrentBlock();
   284             $tpl->setCurrentBlock(
'described_by_description');
   285             $tpl->setVariable(
'DESCRIBED_BY_DESCRIPTION_FIELD_ID', $this->
getFieldId());
   286             $tpl->parseCurrentBlock();
   293             $constraints = 
$lng->
txt(
"form_format") . 
": ###." . str_repeat(
"#", $this->
getDecimals());
   296         if ($this->
getMinValue() !== null && $this->minvalue_visible) {
   300         if ($this->
getMaxValue() !== null && $this->maxvalue_visible) {
   305         if ($constraints !== 
"") {
   306             $tpl->setCurrentBlock(
'described_by_constraint');
   307             $tpl->setVariable(
'DESCRIBED_BY_CONSTRAINT_FIELD_ID', $this->
getFieldId());
   308             $tpl->parseCurrentBlock();
   311         $tpl->setCurrentBlock(
"prop_number");
   313         $tpl->setVariable(
"POST_VAR", $this->
getPostVar());
   315         $tpl->setVariable(
"SIZE", $this->
getSize());
   318             $tpl->setVariable(
"INPUT_SUFFIX", $this->
getSuffix());
   323                 " disabled=\"disabled\""   327         if ($this->client_side_validation) {
   329             $tpl->setVariable(
"JS_ID", $this->
getFieldId());
   332         if ($constraints !== 
'') {
   333             $tpl->setVariable(
"TXT_NUMBER_CONSTRAINTS", $constraints);
   341             $tpl->setVariable(
"REQUIRED", 
"required=\"required\"");
   344         $tpl->parseCurrentBlock();
   356         $this->client_side_validation = $validate;
 parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
setVariable($variable, $value='')
Sets a variable value. 
 
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)