19declare(strict_types=1);
44 protected function init(): void
58 $def->setMin($this->
getMin());
59 $def->setMax($this->
getMax());
71 $this->decimals = max(self::MIN_DECIMALS, abs((
int) $a_value));
90 parent::importFieldDefinition($a_def);
91 $this->
setDecimals($a_def[
"decimals"] ?? self::MIN_DECIMALS);
96 $def = parent::getFieldDefinition();
107 $res = parent::getFieldDefinitionForTableGUI($content_language);
120 bool $a_disabled =
false,
128 parent::addCustomFieldToDefinitionForm($a_form, $a_disabled,
$language);
133 $decimals->setSize(5);
146 parent::importCustomDefinitionFormPostValues($a_form, $language);
147 $this->setDecimals((
int) $a_form->
getInput(
"dec"));
157 parent::addPropertiesToXML($a_writer);
158 $a_writer->
xmlElement(
'FieldValue', array(
"id" =>
"decimals"), $this->getDecimals());
163 if ($a_key ==
"decimals") {
164 $this->setDecimals($a_value !=
"" ? $a_value :
null);
167 parent::importXMLProperty($a_key, $a_value);
ADT definition base class.
AMD field type float (based on integer)
addPropertiesToXML(ilXmlWriter $a_writer)
Add (type-specific) properties to xml export.
importXMLProperty(string $a_key, string $a_value)
Import property from XML.
isFilterSupported()
Is search by filter supported.
__construct(GenericData $generic_data, string $language='')
addCustomFieldToDefinitionForm(ilPropertyFormGUI $a_form, bool $a_disabled=false, string $language='')
Add input elements to definition form.
setDecimals($a_value)
Set decimals.
getFieldDefinition()
Get (type-specific) field definition.
importCustomDefinitionFormPostValues(ilPropertyFormGUI $a_form, string $language='')
Import custom post values from definition form.
getFieldDefinitionForTableGUI(string $content_language)
Parse properties for table gui.
initADTDefinition()
Init adt instance.
getDecimals()
Get decimals.
importFieldDefinition(array $a_def)
Import (type-specific) field definition from DB.
GenericData $generic_data
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc