3 declare(strict_types=1);
27 return self::TYPE_FLOAT;
30 protected function init(): void
44 $def->setMin($this->
getMin());
45 $def->setMax($this->
getMax());
57 $this->decimals = max(self::MIN_DECIMALS, abs((
int) $a_value));
76 parent::importFieldDefinition($a_def);
77 $this->
setDecimals($a_def[
"decimals"] ?? self::MIN_DECIMALS);
82 $def = parent::getFieldDefinition();
93 $res = parent::getFieldDefinitionForTableGUI($content_language);
106 bool $a_disabled =
false,
114 parent::addCustomFieldToDefinitionForm($a_form, $a_disabled,
$language);
117 $decimals->setRequired(
true);
118 $decimals->setValue((
string) $this->
getDecimals());
119 $decimals->setSize(5);
123 $decimals->setDisabled(
true);
132 parent::importCustomDefinitionFormPostValues($a_form,
$language);
143 parent::addPropertiesToXML($a_writer);
149 if ($a_key ==
"decimals") {
150 $this->
setDecimals($a_value !=
"" ? $a_value : null);
153 parent::importXMLProperty($a_key, $a_value);
setDecimals($a_value)
Set decimals.
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...
AMD field type float (based on integer)
importXMLProperty(string $a_key, string $a_value)
getDecimals()
Get decimals.
importCustomDefinitionFormPostValues(ilPropertyFormGUI $a_form, string $language='')
Import custom post values from definition form.
addPropertiesToXML(ilXmlWriter $a_writer)
getFieldDefinitionForTableGUI(string $content_language)
addCustomFieldToDefinitionForm(ilPropertyFormGUI $a_form, bool $a_disabled=false, string $language='')
Add input elements to definition form.
__construct(Container $dic, ilPlugin $plugin)
GenericData $generic_data
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
language()
description: > Example for rendring a language glyph.
__construct(GenericData $generic_data, string $language='')
ADT definition base class.
importFieldDefinition(array $a_def)