19declare(strict_types=1);
33 protected function getInputLabelFromElement(
38 return $presenter->elements()->nameWithParents(
45 protected function addValueFromElement(
49 if ($element->getData()->type() ===
Type::
NULL) {
52 return $input->withValue($element->getData()->value());
55 protected function addConstraintsFromElement(
56 ConstraintDictionary $constraint_dictionary,
59 bool $skip_value =
false
61 foreach ($constraint_dictionary->tagsForElement($element) as $tag) {
62 $input = $this->addConstraintFromTag($input, $tag, $skip_value);
67 private function addConstraintFromTag(
72 switch ($tag->restriction()) {
73 case Restriction::PRESET_VALUE:
77 return $input->withValue($tag->value());
79 case Restriction::NOT_DELETABLE:
80 return $input->withRequired(
true);
83 return $input->withDisabled(
true);
88 protected function getPresetValueFromConstraints(
89 ConstraintDictionary $constraint_dictionary,
90 ElementInterface $element
93 foreach ($constraint_dictionary->tagsForElement($element) as $tag) {
94 if ($tag->restriction() !== Restriction::PRESET_VALUE) {
97 $preset_value = $tag->value();
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))